A subscription on changes from a Listenable.
When you listen on a Listenable using ListenableListenExtension.listen, a ListenableSubscription object is returned.
The subscription saves a reference to the listener so that it can later be removed from listenable using the Listenable.removeListener method under the hood.
Example:
final scrollController = ScrollController();
final subscription = scrollController.listen(() {...});
...
subscription.cancel();
- Implementers
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
-
addTo(
CompositeListenableSubscription compositeSubscription) → void - Adds this subscription to composite container for subscriptions.
-
cancel(
) → void - Removes listener from listenable.
-
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