launch_mode 0.2.0 copy "launch_mode: ^0.2.0" to clipboard
launch_mode: ^0.2.0 copied to clipboard

Automatic launch modes for Flutter root and child isolates, with scoped background handler contexts and explicit initialization when needed.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:launch_mode/launch_mode.dart';

void main() {
  LaunchMode.initializeAutomatically();
  runApp(const LaunchModeExample());
}

class LaunchModeExample extends StatelessWidget {
  const LaunchModeExample({super.key});

  @override
  Widget build(BuildContext context) => MaterialApp(
        home: Scaffold(
          appBar: AppBar(title: const Text('Launch mode')),
          body: Center(child: Text('Current mode: ${LaunchMode.current.name}')),
        ),
      );
}
0
likes
160
points
106
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Automatic launch modes for Flutter root and child isolates, with scoped background handler contexts and explicit initialization when needed.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on launch_mode