Initializer class abstract mixin

Provides a standardized way to initialize something.

Override initialize to initialize internal things. Call to initialize will be done in ensureInitialized once. It is not safe to call initialize repeatedly as ensureInitialized.

To initialize object use ensureInitialized, because it returns Future, which completes when initialization completes, or nothing if it's already initialized.

Annotations

Constructors

Initializer()

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

ensureInitialized() Future<void>
Ensures something was initialized or initializes it.
initialize() FutureOr<void>
Initializes something.
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 Methods

checkInitialized(Initializer initializer, [String? methodName]) bool
Check whether this has been initialized.