JNavigatorImpl class
Default implementation of JNavigator using Flutter's Navigator 1.0 API. You can swap this with a GoRouter-based implementation if needed.
- Implemented types
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
canPop(
BuildContext context) → bool -
Checks if it's possible to pop a route.
override
-
clearAndPush(
BuildContext context, String path) → Future< void> -
Clears the navigation stack and pushes a new route.
override
-
currentRoute(
BuildContext context) → String? -
Returns the current route path as a string, or null if unavailable.
override
-
go(
BuildContext context, String path) → Future< void> -
Navigates to a route by replacing the current one.
pathis the destination route as a string.override -
goNamed(
BuildContext context, String name, {Map< String, String> ? params, Object? extra}) → Future<void> -
Navigates to a named route by replacing the current one.
Supports optional path parameters and extra data.
override
-
isCurrentRoute(
BuildContext context, String path) → bool -
Checks if the current route matches the given
path.override -
Navigates back to the root of the navigation stack.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pop(
BuildContext context) → void -
Pops the current route off the navigation stack.
override
-
popUntil(
BuildContext context, bool predicate(Route)) → void -
Pops routes until the given
predicatereturns true. Useful for returning to a specific route.override -
popWithResult<
T> (BuildContext context, T result) → void -
Pops the current route and returns a
resultto the previous one.override -
push(
BuildContext context, String path) → Future< void> -
Pushes a new route onto the navigation stack.
pathis the route to push.override -
pushDialog<
T> (BuildContext context, Widget dialog) → Future< T?> -
Pushes a dialog route onto the stack and waits for a result.
override
-
pushNamed(
BuildContext context, String name, {Map< String, String> ? params, Object? extra}) → Future<void> -
Pushes a named route onto the stack.
Supports optional path parameters and extra data.
override
-
pushReplacementDialog<
T> (BuildContext context, Widget dialog) → Future< T?> -
Replaces the current route with a dialog and waits for a result.
override
-
replace(
BuildContext context, String path) → Future< void> -
Replaces the current route with a new one.
pathis the new route.override -
replaceAll(
BuildContext context, String path) → Future< void> -
Replaces the entire navigation stack with a new route.
pathis the new root route.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited