popUntil method

void popUntil(
  1. String routeName
)

Pops routes until a specific route is reached

Implementation

void popUntil(String routeName) {
  if (navigator == null) {
    throw StateError('Navigator not initialized');
  }

  navigator!.popUntil((route) => route.settings.name == routeName);
}