Boot & Lifecycle
Bloom eliminates race conditions and scattered initialization boilerplate by orchestrating a deterministic 10-step boot sequence before the first frame renders.
Application Entrypoint
Instead of calling runApp() directly with fragmented await init() calls, pass your bootstrapper to Bloom.boot():
BloomBootstrapper Interface
Implement BloomBootstrapper to configure services, asynchronous database connections, and auth sessions:
The 10-Step Deterministic Sequence
WidgetsFlutterBinding Initialization
Ensures the Flutter engine communication channel is established synchronously.
Environment & Config Loading
Parses .env and compiles compile-time String.fromEnvironment variables into BloomConfig.
BloomContainer Dependency Setup
Instantiates the hierarchical DI container and registers framework singletons.
User Bootstrapper Execution
Executes your custom AppBootstrapper.onBoot(container) hook.
Router Compilation & Guards
Loads generated routes.g.dart, sets up route authentication guards and redirect handlers.
Data Cache Rehydration
Restores persisted SQLite/Hive SWR cache keys for instant offline startup.
Native Autolink Verification
Verifies native platform plugins and config signatures generated by prebuild.
Error Boundary Hooks
Connects FlutterError.onError and PlatformDispatcher.onError to BloomLogger.
App Shell Assembly
Wraps the root widget with BloomTheme, ToastProvider, and Watch contexts.
runApp Launch
Executes runApp() on the Flutter engine with smooth first-frame rendering.