FlushChannel class
Creates an effect that instructs the middleware to flush all buffered items from the channel. Flushed items are returned back to the saga, so they can be utilized if needed.
Example
import 'package:redux_saga/redux_saga.dart';
//...
saga() sync* {
var chan = Result<Channel>();
yield ActionChannel(Action, result: chan);
yield Try(() sync* {
while (true) {
var action = Result();
yield Take(channel: chan.value, result: action);
// ...
}
}, Finally: () sync* {
var actions = Result();
yield FlushChannel(chan.value, result: actions);
// ...
});
}
- Inheritance
-
- Object
- Effect
- EffectWithResult
- FlushChannel
Constructors
- FlushChannel(Channel channel, {Result? result})
- Creates an instance of FlushChannel effect.
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