Closed udoy-touhid closed 8 months ago
Hi! AFAIK, plugins that use platform channels generally don't work from isolates other than the main isolate. I would probably either fetch the timezone before the new isolate is started (since it's unlikely to change) or set up messaging so that you can call this as an RPC to the main isolate.
Alternatively, you can look into if flutter_isolate
solves your problem, though that is a bit more heavy handed.
Ultimately, this behavior is inherent in Flutter and not something I can fix in flutter_timezone
. As such, I'll close this issue. Feel free to let me know if there is in fact a problem that you see in this package 🙂
@tjarvstrand thanks a lot for pointing to the right directions. Really appreciate it.
I'm using workmanager to trigger
workManagerCallback
repeatedly in the background like below.But I'm getting below crash. I think the plugin is not working on iOS while called from a background isolate