All class
Creates an Effect description that instructs the middleware to run multiple Effects in parallel and wait for all of them to complete.
Example
The following example runs two blocking calls in parallel:
import 'package:redux_saga/redux_saga.dart';
import 'fetchApi.dart';
//...
mySaga() sync* {
var result = AllResult();
yield All(
{
#customers: Call(fetchCustomers),
#products: Call(fetchProducts),
},
result: result,
);
}
Notes
When running Effects in parallel, the middleware suspends the Generator until one of the following occurs:
-
All the Effects completed with success: resumes the Generator with an array containing the results of all Effects.
-
One of the Effects was rejected before all the effects complete: throws the rejection error inside the Generator.
- Inheritance
Properties
Methods
-
getDefinition(
) → Map< String, dynamic> -
Returns all properties of effect as a dictionary object
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited