AsyncSignalOptions<T> class
Configuration options for an AsyncSignal.
- Inheritance
-
- Object
- SignalOptions<
AsyncState< T> > - AsyncSignalOptions
Constructors
-
AsyncSignalOptions({T? initialValue, List<
ReadonlySignal> dependencies = const [], void onDone()?, bool? cancelOnError, bool lazy = true, String? name, bool autoDispose = false, void watched()?, void unwatched()?}) -
Creates a new AsyncSignalOptions instance.
const
Properties
- autoDispose → bool
-
Automatically dispose the signal when there are no more listeners.
finalinherited
- cancelOnError → bool?
-
Whether to cancel the stream subscription on error.
final
-
dependencies
→ List<
ReadonlySignal> -
The list of dependencies to watch/listen to.
final
-
equalityCheck
→ SignalEquality<
AsyncState< T> > -
Get the active equality check
no setterinherited
- hashCode → int
-
The hash code for this object.
no setteroverride
- initialValue → T?
-
The initial value of the async signal.
final
- lazy → bool
-
Whether the execution is lazy.
final
- name → String?
-
The name for debugging, tracing, and DevTools inspection.
finalinherited
- onDone → void Function()?
-
Optional function called when a stream completes.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- unwatched → void Function()?
-
Callback called when the signal goes from >=1 to 0 listeners.
finalinherited
- watched → void Function()?
-
Callback called when the signal goes from 0 to >=1 listeners.
finalinherited
Methods
-
copyWith(
{T? initialValue, List< ReadonlySignal> ? dependencies, void onDone()?, bool? cancelOnError, bool? lazy, bool? autoDispose, String? name, void watched()?, void unwatched()?}) → AsyncSignalOptions<T> -
Creates a copy of this options with custom overrides.
override
-
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.
override