route method

dynamic route(
  1. String name,
  2. NyRouteView view, {
  3. PageTransitionType? transition,
  4. PageTransitionSettings? pageTransitionSettings,
  5. List<RouteGuard>? routeGuards,
})

Add a new route with a widget.

Implementation

route(String name, NyRouteView view,
    {PageTransitionType? transition,
    PageTransitionSettings? pageTransitionSettings,
    List<RouteGuard>? routeGuards}) {
  this._addRoute(NyRouterRoute(
    name: name,
    view: view,
    pageTransitionType: transition ?? PageTransitionType.rightToLeft,
    pageTransitionSettings: pageTransitionSettings,
    routeGuards: routeGuards,
  ));
}