Skip to content

Flutter Rust Bridge State When Flutter App Lifecycle is Detached #2361

Answered by fzyzcjy
szczygielmr asked this question in Q&A
Discussion options

You must be logged in to vote

I would like to keep these background processes running when the Flutter application is in a detached state.

So, do you want to make it run for e.g. when user completely exit your app? Then I guess you need to find some doc about underlying platform, or better, some Rust/Dart wrappers. IIRC e.g. Android allows some background service to be long living even if user exits the app, as long as you follow their doc to setup it.

When the Flutter application is resumed, is there a way to reclaim the handle or "rebuild the bridge" to the running rust code?

If the Flutter app is not exited, then the state in Flutter is still there, thus just do everything normally imho.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@szczygielmr
Comment options

@fzyzcjy
Comment options

Answer selected by szczygielmr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants