WidgetRef class abstract
An object that allows widgets to interact with providers.
- Implementers
Constructors
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
-
listen<
T> (ProviderListenable< T> provider, void listener(T? previous, T next), {void onError(Object error, StackTrace stackTrace)?}) → void -
Listen to a provider and call
listener
whenever its value changes. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read<
T> (ProviderBase< T> provider) → T - Reads a provider without listening to it.
-
refresh<
State> (ProviderBase< State> provider) → State - Forces a provider to re-evaluate its state immediately, and return the created value.
-
toString(
) → String -
A string representation of this object.
inherited
-
watch<
T> (ProviderListenable< T> provider) → T - Returns the value exposed by a provider and rebuild the widget when that value changes.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited