pushAndRemoveUntil<T> static method
Implementation
static Future<T?> pushAndRemoveUntil<T>(
Widget page, {
String? routeName,
bool Function(Route<dynamic>)? predicate,
}) {
return Navigator.of(currentContext!).pushAndRemoveUntil<T>(
MaterialPageRoute(
builder: (context) => page,
settings: routeName != null ? RouteSettings(name: routeName) : null,
),
predicate ?? (_) => false,
);
}