OfflinePersistableState<T> class
- Inheritance
-
- Object
- ChangeNotifier
- PersistableState<
T> - OfflinePersistableState
- Available extensions
Constructors
-
OfflinePersistableState(T initialValue, {required String fieldName, required Persistable persistable, Map<
String, Serializable Function(String)> ? typeRegistry, bool enableHistory = false})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- isDisposed → bool
-
Whether this state has been disposed.
no setterinherited
- isInTransaction → bool
-
Whether this state is currently participating in a transaction.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
typeRegistry
→ Map<
String, Serializable Function(String)> ? -
finalinherited
- value ↔ T
-
The current value of the state.
getter/setter pairinherited-getteroverride-setter
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
checkNotDisposed(
) → void -
Throws a StateError if this state has been disposed.
inherited
-
createSnapshot(
) → StateSnapshot< T> -
Creates a snapshot of the current state.
inherited
-
dispose(
) → void -
Discards any resources used by the object.
inherited
-
equals(
T other) → bool -
Checks if the given value is equal to the current state value.
inherited
-
joinTransaction(
StateTransaction transaction) → void -
Joins a transaction.
inherited
-
leaveTransaction(
) → void -
Leaves the current transaction.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
redo(
) → void -
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
restoreFromTransaction(
StateSnapshot< T> snapshot) → void -
Available on ObservableState<
Restores state from a snapshot within a transaction context.T> , provided by the TransactionalStateExtension extension -
restoreSnapshot(
StateSnapshot< T> snapshot) → void -
Restores the state from a previously created snapshot.
inherited
-
setOnline(
bool online) → void -
setValueInTransaction(
T newValue, [StateTransaction? transaction]) → void -
Sets the value within a transaction context.
inherited
-
snapshotForTransaction(
) → StateSnapshot< T> -
Available on ObservableState<
Creates a snapshot of the current state for transaction purposes.T> , provided by the TransactionalStateExtension extension -
syncOffline(
) → void -
toString(
) → String -
A string representation of this object.
inherited
-
undo(
) → void -
inherited
-
updateInTransaction(
void update()) → Future< void> -
Available on ObservableState<
Executes a state update within a transaction.T> , provided by the TransactionalStateExtension extension
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited