Dependent<T> class

Represents a dependency value that is only usable when enabled is true.

Commonly created from a QueryState to gate downstream logic on successful query completion.

Constructors

Dependent({required bool enabled, required T? value})
Creates a dependent value wrapper.
const

Properties

enabled bool
Whether the dependent value is available for use.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → T?
The dependent value when available.
final

Methods

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

Static Methods

of<T>(QueryState<T> state) Dependent<T>
Creates a Dependent from a QueryState.