Bloom class

The core Bloom framework controller and global entrypoint.

Manages application bootstrapping, runtime configuration, dependency injection, feature flags, observability/crash telemetry, and test lifecycle resetting.

Example:

void main() async {
  await Bloom.boot(
    bootstrapper: const AppBootstrapper(),
  );
}

Constructors

Bloom()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

activeFlavor String?
Currently active build flavor (e.g. 'development', 'staging', 'production'), if specified.
no setter
config BloomConfig
Active configuration instance loaded during boot.
no setter
container BloomContainer
Global dependency injection container.
no setter
features BloomFeatureFlags
Dynamic feature flags management service.
no setter
isBooted bool
Whether Bloom has completed its boot sequence.
no setter

Static Methods

addBreadcrumb({required String category, required String message, BloomBreadcrumbLevel level = BloomBreadcrumbLevel.info, Map<String, dynamic>? data}) → void
Records a chronological breadcrumb in the observability buffer.
boot({String? flavor, BloomBootstrapper? bootstrapper, String? envContent, String? configYaml, BloomObservabilityConfig? observability, BloomEnvironmentSchema? environmentSchema}) Future<void>
Main boot pipeline for Bloom applications.
captureException(dynamic exception, {dynamic stackTrace, Map<String, dynamic>? context, List<String>? fingerprint, String? exceptionType, BloomErrorLevel level = BloomErrorLevel.error}) Future<BloomTelemetryEvent?>
Manually captures an exception with structured context and stack trace.
captureMessage(String message, {BloomErrorLevel level = BloomErrorLevel.info, Map<String, dynamic>? context, List<String>? fingerprint}) Future<BloomTelemetryEvent?>
Manually captures a message telemetry event.
createTestScope({List<BloomTestOverride>? overrides}) BloomTestScope
Create an isolated test scope for unit and widget testing with optional dependency overrides.
reset() Future<void>
Reset Bloom runtime state to a pristine baseline (useful between tests).