listenable library
listen and select on a Listenable, kept out of
package:scopo/scopo.dart.
They are extensions on the framework's own Listenable, where another
package is free to put a listen and a select of its own. Exported from
the main import, they came with every scope: a file that also imported such
a package found listen ambiguous, and its select silently replaced by
this one, which is the more specific of the two. The import is the choice.
ListenableSelector, the widget built on select, stays in the main
import: a widget's name collides with nothing in an extension.
Classes
- CompositeListenableSubscription utils
- Acts as a container for multiple subscriptions ListenableSubscription that can be canceled at once.
-
ListenableSelectSubscription<
T extends Object?> utils - A subscription on selected value changes from a Listenable.
- ListenableSubscription utils
- A subscription on changes from a Listenable.
Extensions
- ListenableListenExtension on Listenable utils
-
A helper extension that adds a
listenmethod toListenable, similar toStream.listen. It returns aListenableSubscriptionthat can be easily canceled. - ListenableSelectExtension on L utils
- A helper extension that adds a select method to Listenable. It allows listening to a specific value of the Listenable (selector), triggering the listener only when that value changes.