ReduxNotifierTester<T> class
A wrapper for BaseReduxNotifier
that exposes setState and state.
This is useful for unit tests.
Properties
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
notifier
→ ReduxNotifier<T>
-
The wrapped notifier.
final
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
state
→ T
-
Gets the current state.
no setter
Methods
-
dispatch(SynchronousReduxAction<ReduxNotifier<T>, T, dynamic> action, {String? debugOrigin})
→ T
-
Dispatches an action and updates the state.
Returns the new state.
-
dispatchAsync(AsynchronousReduxAction<ReduxNotifier<T>, T, dynamic> action, {String? debugOrigin})
→ Future<T>
-
Dispatches an asynchronous action and updates the state.
Returns the new state.
-
dispatchAsyncTakeResult<R>(BaseAsyncReduxActionWithResult<ReduxNotifier<T>, T, R> action, {String? debugOrigin})
→ Future<R>
-
Dispatches an asynchronous action and updates the state.
Returns only the result of the action.
-
dispatchAsyncWithResult<R>(BaseAsyncReduxActionWithResult<ReduxNotifier<T>, T, R> action, {String? debugOrigin})
→ Future<(T, R)>
-
Dispatches an asynchronous action and updates the state.
Returns the new state along with the result of the action.
-
dispatchTakeResult<R>(BaseReduxActionWithResult<ReduxNotifier<T>, T, R> action, {String? debugOrigin})
→ R
-
Dispatches an action and updates the state.
Returns only the result of the action.
-
dispatchWithResult<R>(BaseReduxActionWithResult<ReduxNotifier<T>, T, R> action, {String? debugOrigin})
→ (T, R)
-
Dispatches an action and updates the state.
Returns the new state along with the result of the action.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
setState(T state)
→ void
-
Updates the state without dispatching an action.
-
toString()
→ String
-
A string representation of this object.
inherited