clear method

  1. @nonVirtual
void clear()
inherited

Removes all widgets from the navigation stack.

All pending Futures are completed with null values.

Implementation

@nonVirtual
void clear() {
  while (_stack.isNotEmpty) {
    _stack.removeLast().completer.complete(null);
    events.emit<String>(['router', 'pop'].join(Events.sep), '');
  }
}