NavigatorExt extension

Extensions for navigation on the BuildContext.

on

Methods

canPop() bool
just call this canPop() method and it would return true if this route can be popped and false if it’s not possible.
pop<T>({dynamic result}) → void
performs a simple Navigator.pop action and returns given result
popUntil(String screenName, {bool rootNavigator = false}) → void
perform replace with routeName
push(Widget screen, {RouteSettings? settings, bool maintainState = true, bool fullScreenDialog = false, bool rootNavigator = false}) Future
performs a simple Navigator.push action with given route
pushAndRemoveUntil(Widget screen, {RouteSettings? settings, bool maintainState = true, bool fullScreenDialog = false, bool routes = false, bool rootNavigator = false}) Future
perform push and remove route
pushNamed(String screenName, {Object? arguments, bool rootNavigator = false}) Future
perform push with routeName
pushReplacement(Widget screen, {RouteSettings? settings, bool maintainState = true, bool fullScreenDialog = false, bool rootNavigator = false}) Future
performs a simple Navigator.pushReplacement action with given route
pushReplacementNamed(String screenName, {Object? arguments, bool rootNavigator = false}) Future
perform replace with routeName