DisposableComponent class abstract

Inheritance

Constructors

DisposableComponent()

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

broadcaster<T>({FutureOr<void> onCancel()?}) StreamController<T>
Creates a StreamController.broadcast that is closed within dispose.
inherited
cancelBind(Symbol key) Future<bool>
inherited
cancelBindings() Future<void>
Cancel all active listeners, timers and close the controllers. This does not dispose other disposables bound with bind.
inherited
cancelTimer(Symbol key) bool
inherited
cancelUnique(Symbol id) Future<void>
inherited
cancelUniques(Set<Symbol> ids) Future<void>
inherited
controller<T>({bool broadcast = false, FutureOr<void> onCancel()?}) StreamController<T>
Creates a StreamController that is closed within dispose.
inherited
disposable(Disposable disposable) → void
Binds another Disposable object to be disposed when this is disposed.
inherited
dispose() Future<void>
Cancel all active listeners, timers, close the controllers and disposes other disposables bound with bind.
inherited
documentListen<T extends Event>(String eventName, dynamic fn(T)) StreamSubscription<T>
each<T>(Stream<T> stream, void fn(T item), {Symbol? uniqueId}) StreamSubscription<T>
Listens and iterates through stream by calling fn. The listener is disposed in the dispose function.
inherited
interval(Duration duration, dynamic fn(Timer), {Symbol? uniqueId, bool execNow = true}) Timer
inherited
ngOnDestroy() → void
Executed before the directive is removed from the DOM and destroyed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
periodic(Duration duration, dynamic fn(Timer), {Symbol? uniqueId}) Timer
Creates a periodic Timer.periodic that gets cancelled within dispose.
inherited
reusable() Disposable
inherited
streamedInterval<T, E>(Stream<T> valueStream, Duration duration, dynamic fn(T?), {Symbol? uniqueId}) StreamedIntervalTimer
inherited
takeFirst<T>(Stream<T> stream) Future<T>
inherited
timer(Duration duration, dynamic fn()) Timer
Creates a Timer that gets cancelled within dispose if not executed.
inherited
toString() String
A string representation of this object.
inherited
uniqueEach<T>(Symbol id, Stream<T> stream, void fn(T item)) StreamSubscription<T>
Listens and iterates through stream by calling fn. The listener is disposed in the dispose function.
inherited
uniqueListen(Symbol id, ChangeNotifier obj, void fn()) → void
Listens and iterates through obj.addListener by calling fn. The listener is disposed in the dispose function.
inherited
uniqueTimer(Symbol uniqueId, Duration duration, dynamic fn()) Timer
Creates a Timer that gets cancelled within dispose if not executed.
inherited

Operators

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