cobi_flutter_service 1.0.2 icon indicating copy to clipboard operation
cobi_flutter_service: ^1.0.2 copied to clipboard


An implementation of services for Flutter.

CobiFlutterService plugin #

This executes dart code in a second isolate while providing communication between the main and background isolates.

It also integrates with the device's status bar.

This plugin is currently only available for Android.

Usage #

To use this plugin, add cobi_flutter_service as a dependency in your pubspec.yaml file.

Then implement a runner function:

void serviceRunner(SendPort sendPort, ReceivePort receivePort) {
  print("Service runner executed");

To prepare your app to run the background service, initialize it:

void main() {
  CobiFlutterService.instance.initService(serviceRunner, true);

Then you can start the service by calling


For a more advanced use case, see the included example