app/startup/dreamic_bootstrap
library
Functions
-
dreamicBootstrap({required FirebaseOptions firebaseOptions, required DreamicServicesInitializer servicesInitializer, Map<String, dynamic>? additionalRemoteConfigDefaults, DreamicBootstrapHook? afterFirebaseInit, DreamicBootstrapHook? registerBeforeServices, DreamicBootstrapHook? registerAfterServices, DreamicBootstrapHook? captureEntryIntents, bool appCubitNetworkRequired = true, Uri? appCubitEntranceUri, Duration? bootstrapTimeout = const Duration(seconds: 45)})
→ Future<void>
-
Runs the cold-start init chain that today sits in
main() — Firebase, error
backend attach, remote config, app configs base, emulator connect,
DreamicServices.initialize, appInitAppCubit — now behind the splash
rather than before runApp. Returns a single Future<void> the
DreamicAppInitHost/DreamicAppInitGate gates the router on.
-
resetDreamicBootstrapIdempotencyForTest()
→ void
-
Resets the dreamic-core bootstrap idempotency apply-once flags between test
cases (Issue 63/87). Module-level statics persist across cases in one VM, so
without this the "fresh-run applies / re-run skips" assertions become
order-dependent.
Typedefs
-
DreamicBootstrapHook
= FutureOr<void> Function()
-
A plain
FutureOr<void> hook the consuming app composes into the bootstrap
sequence. Hooks run at fixed ordering points (see dreamicBootstrap) and
must be idempotent — they re-run on every gate retry.
-
DreamicServicesInitializer
= Future<DreamicServicesResult> Function(FirebaseApp firebaseApp)
-
App-supplied services initializer. Called at the services step with the
initialized
FirebaseApp; the app calls DreamicServices.initialize(...)
with its own auth-lifecycle and notification callbacks and returns the
result.