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
nullbefore 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
aandbare the same revision. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
revisionFor(
T value) → Object? -
The revision of
valueunder this source's policy. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited