MementoMixin<State extends Object, Error extends Object> mixin
Properties
-
error
→ Error?
-
Get error value;
no setterinherited
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
historyLength
→ int
-
Total size of history state caches
no setter
-
isLoading
→ bool
-
Get
loading
value;
no setterinherited
-
lastState
→ Triple<Error, State>
-
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
state
→ State
-
Get the state value;
no setterinherited
-
triple
→ Triple<Error, State>
-
Get the complete triple value;
no setterinherited
Methods
-
canRedo()
→ bool
-
Return
true
if you can redo
-
canUndo()
→ bool
-
Return
true
if you can undo
-
clearHistory()
→ void
-
-
destroy()
→ Future
-
Discard the store
inherited
-
execute(Future<State> func(), {Duration delay = const Duration(milliseconds: 50)})
→ Future<void>
-
Execute a Future.
inherited
-
executeEither(Future<EitherAdapter<Error, State>> func(), {Duration delay = const Duration(milliseconds: 50)})
→ Future<void>
-
Execute a Future Either
dartz
.
inherited
-
executeStream(Stream<State> stream)
→ StreamSubscription
-
Execute a Stream.
inherited
-
initStore()
→ void
-
inherited
-
middleware(Triple<Error, State> newTriple)
→ Triple<Error, State>
-
called when dispacher update, setLoading or setError
overriding to change triple before the propagation;
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
observer({void onState(State state)?, void onLoading(bool isLoading)?, void onError(Error error)?})
→ Disposer
-
Observer the Segmented State.
inherited
-
propagate(Triple<Error, State> triple)
→ void
-
IMPORTANT!!!
THIS METHOD TO BE VISIBLE FOR OVERRIDING ONLY!!!
inherited
-
redo()
→ void
-
redo the last state value.
-
setError(Error newError, {bool force = false})
→ void
-
Change the error value.
inherited
-
setLoading(bool newloading, {bool force = false})
→ void
-
Change the loading value.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
-
undo()
→ void
-
Undo the last state value.
-
update(State newState, {bool force = false})
→ void
-
Change the State value.
override
-
when<TReturn>({required TReturn onState(State state), TReturn onLoading(bool isLoading)?, TReturn onError(Error error)?})
→ TReturn
-
Represents a value of one of three mapped possibilities.
inherited