call method
Implementation
@override
Stream<DState> call(DripEvent event, DState state) async* {
if (event is UndoMemory<DState> && _history.isNotEmpty) {
yield _history.removeLast();
} else if (event is DrainMemory<DState>) {
_history.clear();
yield state;
} else {
if (_history.length >= historySize) {
_history.removeAt(0);
}
_history.add(state);
yield state;
}
}