xinthink / flt_worker

Schedule & run Dart code in the background on both Android & iOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question] Is there any way to get progress callbacks from a Worker scheduled task?

AAverin opened this issue · comments

I need to show a download progress indicator in the app while the heavy task is being processed in the background.
How can I get progress and result callbacks?

Maybe there is some way to pass into the Worker a dispatcher that could dispatch an action?

You may try to pass a SendPort via the request input, but I'm not sure whether it would work.
However, one way to do it may be sharing the progress through a file or database record. The BitCoin price example may help.
Good luck!