DerivedPod<T> class

Inheritance
Available extensions

Constructors

DerivedPod(T compute())
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
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.
getter/setter pairinherited-getteroverride-setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
call([dynamic newValue = _marker]) → T
Callable support! e.g. counter() to get, and counter(10) to set.
inherited
debounce(Duration duration, void callback(T value)) VoidCallback

Available on WhalePod<T>, provided by the PodWorkers extension

Calls callback when the value changes, but only after duration has passed without any further changes. Extremely useful for search fields to avoid spamming an API.
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
override
ever(void callback(T value)) VoidCallback

Available on WhalePod<T>, provided by the PodWorkers extension

Calls callback every time the value changes. Returns a function that cancels the listener.
interval(Duration duration, void callback(T value)) VoidCallback

Available on WhalePod<T>, provided by the PodWorkers extension

Calls callback at most once every duration upon changes. Useful to restrict the firing rate of rapid events (e.g. scroll metrics).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notify() → void
Expose explicitly to process batched changes internally.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
once(void callback(T value)) VoidCallback

Available on WhalePod<T>, provided by the PodWorkers extension

Calls callback only once, the next time the value changes.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
toString() String
A string representation of this object.
inherited
watch(BuildContext context) → T
Registers context to explicitly rebuild when the pod value changes.
inherited

Operators

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