flutter_js icon indicating copy to clipboard operation
flutter_js copied to clipboard

type 'Future<dynamic>' is not a subtype of type 'Future<Map<dynamic, dynamic>>' in type cast

Open agordeev opened this issue 1 year ago • 0 comments

I'm simply trying to instantiate the library:

flutterJs = FlutterJs();

but initEngine throws this error:


flutter: type 'Future<dynamic>' is not a subtype of type 'Future<Map<dynamic, dynamic>>' in type cast
flutter:
#0      FlutterJs.initEngine
flutter_js.dart:152
#1      new FlutterJs
flutter_js.dart:106

on this line:

    Map<dynamic, dynamic> mapResult = await (_methodChannel.invokeMethod(
        "initEngine", engineId) as Future<Map<dynamic, dynamic>>);

agordeev avatar Aug 05 '23 15:08 agordeev