LifecycleAwareMixin mixin

Lifecycle mixin that provides convenience hooks for registering cancellables, like timers, streams, etc.

Implemented types

Properties

hasBeenInitialized bool
A helpful flag that allows us to ensure that mixins that participate in the lifecycle have been set up properly... sometimes, they may require that a registration hook has been invoked in the constructor, so checking this variable ensures that things have been set up properly.
no setter
hashCode int
The hash code for this object.
no setterinherited
instanceId String
no setteroverride
log → Logger
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

autoStream<T>(String name, LifecycleCallback<Stream<T>> stream, {bool cancelOnError = false}) Future
autoSubscribe(String name, LifecycleCallback<StreamSubscription> generate) Future
autoTimer(String name, LifecycleCallback<Timer> generate) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onDestroy(String name, LifecycleCallback destroy, {Duration? wait}) → void
onInit(String name, LifecycleCallback init, {Duration? wait}) → void
onLifecycleEvent(LifecycleEvent event) FutureOr
override
toString() String
A string representation of this object.
inherited

Operators

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