launch_mode 0.1.0
launch_mode: ^0.1.0 copied to clipboard
Explicit, initialize-once launch modes for each Dart isolate, with simple foreground, background, and worker checks. Compatible with Flutter.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased #
0.1.0 - 2026-09-14 #
Added #
LaunchModeTypewithunspecified,foreground,background, andisolatemodes.- Synchronous
LaunchMode.initializewith one mode per isolate. Repeating the same mode is allowed; conflicting modes throwStateError, andunspecifiedthrowsArgumentErrorwithout changing the current mode. LaunchMode.current,isInitialized,isForeground,isBackground, andisIsolatefor selecting application logic by launch mode.- A pure Dart library compatible with Flutter and Web, with no runtime dependencies.
- Entry point examples, lifecycle and Web guidance, strict analyzer configuration, and regression tests for initialization and isolate independence.