Documentation - How to communicate between the background task (isolate) and other widgets #541
Open
4 tasks done
Labels
bug
Something isn't working
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,
The text was updated successfully, but these errors were encountered: