I am trying to call a function (widget.onTap()) in the following code
GestureDetector(
onTap: () {
widget.onTap()
},
child: Container(
height: 1.9 * widget.height,
width: 1.2 * widget.width,
child: HtmlElementView(viewType: 'liquid-button', key: UniqueKey(),),
),
)
I have registered my "liquid-button" as such
ui.platformViewRegistry.registerViewFactory('liquid-button', (int viewId) {
var element = html.IFrameElement()
..style.border = 'none'
..srcdoc = """
<!DOCTYPE html>
<head>
</head>
<body>
<svg class="liquid-button"
...
"""
return element;
});
The problem is I cannot capture anything from the user no matter what I try. The GestureDetector doesn't work, neither do the buttons. I am able to trigger some code in JS, but I need to handle it in Dart. Is this possible ?