clear method
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), '');
}
}