AutoDisposeControllerMixin mixin
Mixin to simplifying managing the lifetime of listeners used by a DisposableController.
This mixin works by delegating to a DisposerMixin. It implements all of DisposerMixin's interface.
See also:
- AutoDisposeMixin, which provides the same functionality for a StatefulWidget.
- Superclass constraints
- Implemented types
- Mixin applications
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
listenables
→ List<
Listenable> -
no setteroverride
-
listeners
→ List<
void Function()> -
Not using VoidCallback because of
https://github.com/dart-lang/mockito/issues/579
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addAutoDisposeListener(
Listenable? listenable, [VoidCallback? listener, String? id]) → void -
Add a listener to a Listenable object that is automatically removed when
cancel is called.
override
-
autoDisposeFocusNode(
FocusNode? node) → void -
Track a focus node that will be automatically disposed on dispose.
override
-
autoDisposeStreamSubscription(
StreamSubscription subscription) → void -
Track a stream subscription to be automatically cancelled on dispose.
override
-
callOnceWhenReady<
T> ({required VoidCallback callback, required ValueListenable< T> trigger, required bool readyWhen(T triggerValue)}) → void -
Runs
callback
whentrigger
's value satisfies thereadyWhen
function.override -
cancelFocusNodes(
) → void -
Cancel all focus nodes added.
override
-
cancelListener(
VoidCallback? listener) → void -
Cancels a single listener, if present.
override
-
cancelListeners(
{List< String> excludeIds = const <String>[]}) → void -
Cancel all listeners added.
override
-
cancelStreamSubscriptions(
) → void -
Cancel all stream subscriptions added.
override
-
dispose(
) → void -
override
-
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