Cancelled class
Creates an effect that instructs the middleware to return whether this generator has been cancelled. Typically you use this Effect in a finally block to run Cancellation specific code.
Example
import 'package:redux_saga/redux_saga.dart';
//...
saga() sync* {
yield Try(() sync* {
// ...
}, Finally: () sync* {
var cancelled = Result<bool>();
yield Cancelled(result: cancelled);
if (cancelled.value) {
// logic that should execute only on Cancellation
}
// logic that should execute in all situations (e.g. closing a channel)
});
}
- Inheritance
-
- Object
- Effect
- EffectWithResult
- Cancelled
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