undo method

  1. @override
Future undo()
override

Sends the PREVIOUS value from the history back to the bus (one step back). Returns null when there is nothing to roll back to (fewer than two calls).

Implementation

@override
Future<dynamic> undo() async {
  if (_queue.length < 2) {
    return null;
  }
  _queue.removeLast();
  var previous = _queue.last;
  return _call(previous.$1, previous.$2);
}