SyncState<U> class
abstract
Interface to sync state across server and client
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
syncCodec
→ Codec<
U, dynamic> ? -
Codec used to serialize the state data on the server and deserialize on the client
Should convert the state to any dynamic type: Null, bool, double, int, Uint8List, String, Map, List
no setter
- syncId → String
-
Globally unique id used to identify the state data between server and client
no setter
Methods
-
getState(
) → U - Called on the server after the initial build, to retrieve the state data of this component.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateState(
U? value) → void - Called on the client when a new state value is available, either when the state is first initialized, or when the state becomes available through lazy loading a route.
-
wantsSync(
) → bool - Can be overridden to signal that the state should not be synced
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited