Get<T, V extends ValueListenable<T>> extension type

Encapsulates a ValueListenable object with an interface for easy updates and automatic lifecycle management.

on
  • V
Implemented types
Implementers
Available extensions

Constructors

Get.custom(V _hooked)

Properties

addListener → void
Don't add a listener directly! Prefer using Ref.watch or something similar.
no setter
hashCode int
The hash code for this object.
no setterinherited
hooked → V

Available on Get<Object?, V>, provided by the GetHooked extension

Don't get hooked.
no setter
removeListener → void
Don't remove a listener directly! Prefer using Ref.watch or something similar.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → T
The current value of the object. When the value changes, the callbacks registered with addListener will be invoked.
no setterinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object notifies its listeners.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that the object notifies.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

async<T>(AsyncValueGetter<T> futureCallback, {T? initialData}) GetAsync<T>
Encapsulates an AsyncNotifier with a preconfigured futureCallback.
compute<Result>(RefComputer<Result> callback) GetComputed<Result>
Encapsulates a Listenable which notifies based on a RefComputer callback.
customVsync<T, A extends Animation<T>>(VsyncBuilder<A> builder) GetVsync<T, A>
Encapsulates any Animation via the provided VsyncBuilder.
it<T>(T initialValue) GetValue<T>
Encapsulates a ValueNotifier.
list<E>([Iterable<E> list = const []]) GetList<E>
Encapsulates a ListNotifier, and can be used as a List directly.
map<K, V>([Map<K, V> map = const {}]) GetMap<K, V>
Encapsulates a MapNotifier, and can be used as a Map directly.
proxy<T, L extends Listenable>(L listenable, T getValue(L)) GetProxy<T, L>
Encapsulates a ProxyNotifier, using the provided callback to retrieve a value.
set<E>([Iterable<E> set = const {}]) GetSet<E>
Encapsulates a SetNotifier, and can be used as a Set directly.
stream<T>(StreamCallback<T> streamCallback, {T? initialData, bool cancelOnError = false, bool notifyOnCancel = false}) GetAsync<T>
Encapsulates an AsyncNotifier with a preconfigured streamCallback.
vsync({double? initialValue, Duration? duration, Duration? reverseDuration, AnimationBehavior? animationBehavior, String? debugLabel, double? lowerBound, double? upperBound, bool bounded = true}) GetVsyncDouble
Encapsulates an AnimationController.
vsyncValue<T>(T initialValue, {Duration? duration, Curve? curve, AnimationBehavior animationBehavior = AnimationBehavior.normal, LerpCallback<T>? lerp}) GetVsyncValue<T>
Encapsulates a ValueAnimation.