Open jonathanMNg opened 8 months ago
I can imagine this being a very common use-case when using background tasks. At least I found out I needed this within the first week of using background tasks.
Not sure if the documentation would require a full guide or maybe just a section with some references to this issue for example, as this is more about how Isolates work then about this package specifically.
Anyway, I'm very grateful that you shared this!
@jonathanMNg Thanks! Very resourceful. Had I found this in the documentation, I would have saved 4 hours of my day.
Thank you but unfortunately this solution don't work after killing the app or restarting the device :(
Thank you but unfortunately this solution don't work after killing the app or restarting the device :(
Yes, there is no way to do it in IOS, and you maybe able to do it in Android if you can fork the Android kernel and modify it to add your app to run after killing/restarting :)
Version 0.5.0
Describe the error Hi, I'm trying to execute a Bloc event with the workmanager callbackDispatcher(). However, because the function callbackDispatcher itself is an Isolate, it can't modify the variables of the main execution. My workaround is to use SendPort and ReceivePort.
In the main.dart:
In the timer_bloc.dart:
I think that adding this to the documentation would help others. FYI, I copied that code from this project flutter_downloader Thanks,