popCount method

void popCount(
  1. int count
)

Pops up to count routes.

Implementation

void popCount(int count) {
  final NavigatorState navigator = Navigator.of(this);
  for (int i = 0; i < count; i++) {
    if (!navigator.canPop()) break;
    navigator.pop();
  }
}