router/ny_router
library
Classes
ArgumentsWrapper
ConditionalGuard
Conditionally apply a guard based on a predicate.
GuardStack
Compose multiple guards into a single guard.
NyArgument
Nylo Route Argument
Contains the data passed from another route.
NyNavigator
The NyNavigator class is a singleton class that manages the routing of the
application. It is a thin layer on top of Navigator to help you encapsulate
and manage routing at one place.
NyQueryParameters
Nylo Query Parameters
Contains the data passed from the URL.
E.g. "/home-page?userId=2
data = {"userId": "2"}
NyRouteGuard
Base class for Nylo route guards.
NyRouteHistoryObserver
A NavigatorObserver that keeps track of the current route.
NyRouter
NyRouterRoute manages routing, registering routes with transitions, navigating to
routes, closing routes. It is a thin layer on top of Navigator to help
you encapsulate and manage routing at one place.
NyRouterOptions
Options to configure a Nylo Router instance.
NyRouterRoute
The NyRouterRoute class is used to define a route in the Nylo Router.
PageNotFound
Legacy page request class for backward compatibility.
PageTransition <T >
A flexible page transition class that extends PageRouteBuilder to provide
a variety of customizable transition animations between screens.
PageTransitionSettings
This class contains all page transition settings.
ParameterizedGuard <P >
A route guard that accepts configuration parameters.
RedirectConfig
Configuration for a redirect action.
RouteContext <T >
Immutable context passed to route guards.
RouteData
Route data class for navigation configuration.
RouteGuard
@deprecated Use NyRouteGuard instead.
Legacy class interface for backward compatibility.
RouteMatch
Represents a matched route with its parameters.
RouteMatcher
The RouteMatcher class is used to match the route with the registered routes.
TransitionType
A utility class that simplifies the creation of page transitions by encapsulating
transition types and their associated settings.
Functions
nyRoutes (dynamic build (NyRouter router ) )
→ NyRouter
Builds the routes in the router.dart file
routeIf (bool condition , dynamic routeName , {dynamic data , Map <String , dynamic > ? queryParameters , NavigationType navigationType = NavigationType.push , dynamic result , bool removeUntilPredicate (Route route )?, TransitionType ? transitionType , PageTransitionType ? pageTransitionType , PageTransitionSettings ? pageTransitionSettings , dynamic onPop (dynamic value )? })
→ Future <void >
Navigate to a new route if a condition is met.
If the condition is false, the route will not be navigated to.
routeTo (dynamic routeName , {dynamic data , Map <String , dynamic > ? queryParameters , NavigationType navigationType = NavigationType.push , dynamic result , bool removeUntilPredicate (Route route )?, TransitionType ? transitionType , PageTransitionType ? pageTransitionType , PageTransitionSettings ? pageTransitionSettings , int ? tabIndex , dynamic onPop (dynamic value )? })
→ Future <void >
Navigate to a new route.
routeToAuthenticatedRoute ({dynamic data , NavigationType navigationType = NavigationType.pushAndForgetAll , dynamic result , bool removeUntilPredicate (Route route )?, TransitionType ? transitionType , PageTransitionType ? pageTransitionType , PageTransitionSettings ? pageTransitionSettings , dynamic onPop (dynamic value )? })
→ Future <void >
Navigate to the auth route.
routeToInitial ({dynamic data , NavigationType navigationType = NavigationType.pushAndForgetAll , dynamic result , bool removeUntilPredicate (Route route )?, TransitionType ? transitionType , PageTransitionType ? pageTransitionType , PageTransitionSettings ? pageTransitionSettings , dynamic onPop (dynamic value )? })
→ Future <void >
Navigate to the initial route.