FHUNavigatorExtension extension
Properties
-
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.
no setter
Methods
-
Recursively dismisses active pop-up elements within the app.
This method automatically closes pop-up elements such as dialogs, modal bottom sheets,
and Cupertino modal popups. It does this by programmatically navigating back in the
widget tree until no pop-up routes remain.
The following types of routes are considered pop-ups:
-
maybePop<T extends Object?>([T? result])
→ Future<void>
-
This method calls Navigator.maybePop to attempt to pop the current route if possible.
It is useful when you want to handle back navigation and check if the route can be popped
without causing any errors.
-
modalRoute<T extends Object?>()
→ ModalRoute<T>?
-
-
navigator({bool rootNavigator = false})
→ NavigatorState
-
-
pAndRemoveUntil<T extends Object?>(Widget screen, {bool allowSnapshotting = true, RouteSettings? settings, bool maintainState = true, bool fullscreenDialog = false, bool routes = false})
→ Future<T?>
-
Perform push and remove route
-
pNamed<T extends Object?>(String screenName, {Object? arguments})
→ Future<T?>
-
Perform push with routeName
-
pNamedAndRemoveUntil<T extends Object?>(String screenName, RoutePredicate predicate, {bool allowSnapshotting = true, Object? arguments})
→ Future<T?>
-
Perform push and remove route with routeName
-
popPage<T extends Object?>([T? result])
→ void
-
-
popRoot<T extends Object?>([T? result])
→ void
-
This method allows for popping dialogs by calling
the pop method with the rootNavigator parameter set to true.
This feature proves to be useful in scenarios where dialogs need to be dismissed.
-
popUntil(String screenName)
→ void
-
Perform pop until a specific route name
-
pReplacement<T extends Object?, TO extends Object?>(Widget screen, {bool allowSnapshotting = true, RouteSettings? settings, bool maintainState = true, bool fullscreenDialog = false})
→ Future<T?>
-
Performs a simple Navigator.pushReplacement action with given
route
-
pReplacementNamed<T extends Object?, TO extends Object?>(String screenName, {Object? arguments, TO? result})
→ Future<T?>
-
Perform replace with routeName
-
pushPage<T extends Object?>(Widget screen, {RouteSettings? settings, bool maintainState = true, bool fullscreenDialog = false, bool allowSnapshotting = true})
→ Future<T?>
-
Performs a simple Navigator.push action with given
route