You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that the current implementation of env.dart uses a global variable for LocationDatabase which doesn't work well with isolates, I believe.
The second test of the following two tests fails and throws a LocationNotFoundException.
There were various problems using plugins from isolates prior to Flutter 3.7, which aren't really an issue with this package but a limitation of flutter itself. Try updating to 3.7 or later and this should be resolved - see this excellent blogpost for a full explanation
Take particular note of the use of BackgroundIsolateBinaryMessenger.ensureInitialized(rootIsolateToken) and also use DartPluginRegistrant.ensureInitialized() and you should be good to go. I've been initialising timezones in flutter 3.7 in isolates and have no problems.
Hello @srawlins, thank you for the very helpful library.
I was trying to use flutter's
compute
function to move the initialization process to a new isolate using the following code:The problem is that the current implementation of
env.dart
uses a global variable forLocationDatabase
which doesn't work well with isolates, I believe.The second test of the following two tests fails and throws a
LocationNotFoundException
.The text was updated successfully, but these errors were encountered: