BaselineSource<T extends Object> class

Where a tracker learns that the saved state it should compare against has been replaced — typically the provider or bloc holding the server's copy.

Annotations

Constructors

BaselineSource({required T? read(), required Listenable signal, Object? revisionOf(T value)?, VoidCallback? onDispose})
Creates a baseline source.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
onDispose VoidCallback?
Releases anything this source owns. Called by the tracker on dispose — this is how a signal adapted from a stream gets cleaned up.
final
read → T? Function()
Reads the current saved state, or null before it has loaded.
final
revisionOf Object? Function(T value)?
Identifies a revision of the saved state.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
signal Listenable
Notifies whenever read might return something new.
final

Methods

isSameRevision(T? a, T? b) bool
Whether a and b are the same revision.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
revisionFor(T value) Object?
The revision of value under this source's policy.
toString() String
A string representation of this object.
inherited

Operators

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