flutterfire
flutterfire copied to clipboard
☂️ Support for Background Isolates
This umbrella issue describes the current support of Background Isolates (announced as of Flutter 3.7) with FlutterFire.
The current implementation of Background Isolates only supports Flutter->Host and not the other way around. It means plugins that need to communicate back to Flutter will not work yet with Background Isolates.
Current support:
🚧 cloud_firestore (works but some errors when hot reloading, no support for subscribing to documents) ✅ cloud_functions ❓ firebase_analytics ❓ firebase_app_check ❓ firebase_app_installations 🚧 firebase_auth (some functions not available - verifyPhone) ✅ firebase_core ❓ firebase_crashlytics 🚧 firebase_database (works but some errors when hot reloading, no support for subscribing to documents) ❌ firebase_dynamic_links ❓ firebase_in_app_messaging ❓ firebase_messaging ❓ firebase_ml_custom ❓ firebase_ml_model_downloader ❓ firebase_ml_vision ✅ firebase_performance ❓ firebase_remote_config ❌ firebase_storage
Legend:
❓ = Not yet tested ✅ = Works 🚧 = Works partially ❌ = Doesn't work
How to know if it doesn;t work, is there any error occured?
@ariefwijaya Yes, if it doesn't work, you'll get an error.
Oh, sorry but I tried and firebase_storage
worked in isolate. I use it to download file using await firebaseStorage.refFromURL(url).writeToFile(existFile);
@Lyokone
@ariefwijaya Did you try with RootIsolateToken
?
@Lyokone I'm using WorkManager to work in isolate
@ariefwijaya As pointed in the issue, this thread is for tracking support of Flutter own Background Isolates
Is it planned to add documentation regarding available features to pub.dev of the packages or any other place? I couldn't find it anywhere in the official documentation and it's currently a process of trial and error to figure out what works in the background.
Currently, we rely on both ways communication. As long as Flutter will not provide communication from the host to Flutter, it will probably stay in this state.
Currently, we rely on both ways communication. As long as Flutter will not provide communication from the host to Flutter, it will probably stay in this state.
I understand the underlying issue but this doesn't seem to be documented anywhere in the Flutter packages.