EmitterElement<T> class
Emitter's element.
- Inheritance
-
- Object
- ElementBase<
Future< T> > - EmitterElement
Constructors
-
EmitterElement(dynamic ref, Emitter<
T> creator, Completer<T> completer)
Properties
-
completer
→ Completer<
T> -
This Completer produces a empty future in the constructor, then complete
the future when the first state is emitted. In other words, an
Emitter generates these states in sequence:
final
- created ↔ bool
-
Whether the creator has been created at least once.
getter/setter pairinherited
-
creator
→ CreatorBase<
Future< T> > -
finalinherited
- error ↔ Object?
-
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
prevState
↔ Future<
T> ? -
getter/setter pairinherited
- prevValue ↔ T?
-
getter/setter pair
- ref → Ref
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stackTrace ↔ StackTrace?
-
getter/setter pairinherited
-
state
↔ Future<
T> -
getter/setter pairinherited
- value ↔ T?
-
Emitted value. Base class already saves Future
getter/setter pair
Methods
-
emit(
T? newValue, [Object? error, StackTrace? stackTrace]) → void - The emit function which could be called in user provided create function.
-
getState(
) → Future< T> -
Get error-aware state.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
recreate(
{bool autoDispose = false}) → Future< void> -
Allow the creator to update its state. Called when:
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited