FutureAction<A, P> class
A Redux
action class primarily used for dispatching an
action containing Future.
The FutureAction takes a Future which is needed to be completed and an optional extras argument in order to pass any extra information down to every FutureAction which is dipatched.
The FutureAction takes an identifying action and a payload type
(defining the return type of Future), as generic arguments. These
generic arguments are used in creating three actions, i.e.,
FuturePendingAction, FutureSucceededAction and FutureFailedAction,
which can be consumed by the Reducer
defined by the user.
Constructors
-
FutureAction({required Future<
P> future, Map<String, dynamic> extras = const {}})
Properties
-
extras
↔ Map<
String, dynamic> -
The extras which are passed along to the created actions.
getter/setter pair
-
future
↔ Future<
P> -
The Future passed to the action.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
-
pendingAction
→ FuturePendingAction<
A> -
The getter for generated FuturePendingAction used by
the Middleware.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
failedWith(
dynamic error) → FutureFailedAction< A> - The getter for generated FutureFailedAction used by the Middleware.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
succeededWith(
P payload) → FutureSucceededAction< A, P> - The getter for generated FutureSucceededAction used by the Middleware.
-
toJson(
) → Map< String, dynamic> - This function is used to convert the action into FSA format This is useful for interoperability between different redux modules
-
toString(
) → String -
This function can be used in debugging to identify the
action dispatched, especially in case of multiple actions
dispatched, if needed.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited