router/router library

Classes

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.
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.
RouteMatch
RouteMatcher
The RouteMatcher class is used to match the route with the registered routes.

Enums

The NavigationType enum is used to define the type of navigation to be

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)?, PageTransitionSettings? pageTransitionSettings, PageTransitionType? pageTransition, dynamic onPop(dynamic value)?}) → dynamic
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)?, PageTransitionSettings? pageTransitionSettings, PageTransitionType? pageTransitionType, int? tabIndex, dynamic onPop(dynamic value)?}) → dynamic
Navigate to a new route.
routeToAuthenticatedRoute({dynamic data, NavigationType navigationType = NavigationType.pushAndForgetAll, dynamic result, bool removeUntilPredicate(Route route)?, PageTransitionSettings? pageTransitionSettings, PageTransitionType? pageTransitionType, dynamic onPop(dynamic value)?}) → dynamic
Navigate to the auth route.
routeToInitial({dynamic data, NavigationType navigationType = NavigationType.pushAndForgetAll, dynamic result, bool removeUntilPredicate(Route route)?, PageTransitionSettings? pageTransitionSettings, PageTransitionType? pageTransitionType, dynamic onPop(dynamic value)?}) → dynamic
Navigate to the initial route.

Typedefs

NyRouteView = Widget Function(BuildContext context)
RouteView = (String, Widget Function(BuildContext context))
Type definition for the route view.