popToFirst method

void popToFirst()

Pops the top-most route off the navigator till the first route.

Implementation

void popToFirst() {
  // ignore: always_specify_types
  Navigator.of(this).popUntil((predicate) {
    return predicate.isFirst;
  });
}