-
Notifications
You must be signed in to change notification settings - Fork 81
Description
If I use Dart's Isolate.run() method I can send a closure as a computation parameter. If there are non-primitive variables in the closure, these are handled safely but I can't pass them in the message arguments.
In the flutter_isolate package I don't have a similar functionality so I end up in this situation:
- if I use
flutter_isolateI can only send references to top level and static methods, being able to use the native API plugins but I can't use closure; - if I use
Isolate.run()I can send closures (with data inside that I can't send in themessage) but I can't use the native API plugins.
Therefore, is it possible to have a flutterRun() function (similar to flutterCompile()) or a FlutterIsolate.run method (similar to FlutterIsolate.spawn) which allows both to send closure (overcoming the problem of sending non-primitive variables) and at the same time be able to use the FlutterIsolate wrapper which allows me to use native API plugins?
If it were possible, while waiting for this functionality, is it possible now to have a workaround to be able to send closures using the package wrapper?
Thank you.