flutter_background_service icon indicating copy to clipboard operation
flutter_background_service copied to clipboard

Provide onStopped callback for when the service is stop.

Open Turburlar opened this issue 2 years ago • 2 comments

This will allow for cleaning up of resources when the service is stopped.

For example my background opens streams to firestore in the onStart method, and there is no way for me to call close on those streams when the service is killed.

Turburlar avatar Jan 05 '23 18:01 Turburlar

When the service is stopped, the resources will be freed automatically because the isolate will be killed.

ekasetiawans avatar Jan 06 '23 08:01 ekasetiawans

FlutterBackgroundService().invoke("stop_service", null); i use this function and work it

appsorooshan avatar Sep 30 '23 10:09 appsorooshan