pushAndRemoveUntil method
- Widget screen, {
- RouteSettings? settings,
- bool maintainState = true,
- bool fullscreenDialog = false,
- bool routes = false,
perform push and remove route
Implementation
Future<dynamic> pushAndRemoveUntil(Widget screen, {RouteSettings? settings, bool maintainState = true, bool fullscreenDialog = false, bool routes = false, bool rootNavigator = false}) async => await Navigator.of(this, rootNavigator: rootNavigator).pushAndRemoveUntil(MaterialPageRoute(builder: (_) => screen, settings: settings, maintainState: maintainState, fullscreenDialog: fullscreenDialog), (Route<dynamic> route) => routes);