BaseScopeHolder<Scope, Container extends ScopeContainer> class abstract

Holder contains the state of a BaseScopeContainer — null or the scope itself. This is the core entity that provides access to the BaseScopeContainer.

This holder allows to keep a BaseScopeContainer as an abstract interface Scope. Your BaseScopeContainer have to implement this Scope interface.

You can use ScopeHolder if you don't need to differentiate BaseScopeContainer and it's interface.

Inheritance
Implementers

Constructors

BaseScopeHolder.new({@Deprecated('Use scopeObservers instead') List<ScopeListener>? scopeListeners, @Deprecated('Use depObservers instead') List<DepListener>? depListeners, @Deprecated('Use asyncDepObservers instead') List<AsyncDepListener>? asyncDepListeners, List<ScopeObserver>? scopeObservers, List<DepObserver>? depObservers, List<AsyncDepObserver>? asyncDepObservers})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scope → Scope?
no setterinherited
state ScopeState<Scope>
no setterinherited
stateStream Stream<ScopeState<Scope>>
no setterinherited
stream Stream<Scope?>
no setterinherited

Methods

create() Future<void>
createContainer() → Container
drop() Future<void>
Dispose scope. Scope becomes unavailable.
inherited
init(Container scope) Future<void>
Initialize scope. Scope becomes available and everyone can start working with it via BaseScopeHolder.
inherited
listen(StateListener<Scope> listener, {bool emitImmediately = false}) RemoveStateListener
Subscribes to the state.
inherited
listenState(ScopeStateListener<Scope> listener, {bool emitImmediately = false}) RemoveStateListener
Subscribes to the state.
inherited
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