-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
I'm writing a Flutter Plugin which starts long-running C-Functions inside an isolate via FFI. The problem: Hot reloading is broken as long as the C function is executed.
I could easily stop the C function before executing the hot reload. To do this a callback informing me of an upcoming hot reload is needed. Currently, I can override reassemble as stated at StackOverflow. But this function is only called after a hot reload, not before.
In addition to the reassemble method, we need a willReassemble method informing us about an upcoming hot reload. I can then stop my long-running isolate.
Check out the example flutter plugin demonstrating the issue:
https://github.com/gatzsche/flutter-dart-ffi-hotreload-issue