Open jonathanMNg opened 4 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!
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,