pushAndRemoveUntil<T> method
Pushes page and removes every route until predicate.
Implementation
Future<T?> pushAndRemoveUntil<T>(
Widget page,
bool Function(Route<dynamic>) predicate,
) =>
Navigator.of(this).pushAndRemoveUntil<T>(
MaterialPageRoute<T>(builder: (_) => page),
predicate,
);