I am a newbie doing Flutter and I want render 3d stuff on display using threejs because flutter scene is not supported for web yet. I thought of using an InAppWebView doing the threeJS stuff and in front I use the Flutter widgets to make the UI.
The problem is, that everything I place in front of the InAppWebView does not get any mouse events. I suppose it is because the InAppWebView uses an iframe and the events are not forwarded to the widgets in front.
The problem is only when using web target not macos target. Does anyone had same issues or know how I can solve this problem?
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: SelectableText('Three.js Cube $_counter')),
drawer: myDrawer(context: context),
body: InAppWebView(
initialFile: "assets/index.html",
initialSettings: InAppWebViewSettings(
javaScriptEnabled: true
),
onWebViewCreated: (InAppWebViewController controller) {
_controller = controller;
},
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: const Icon(Icons.add),
),
);
}