route method

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

Add a new route with a widget.

Implementation

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