define method Null safety

void define(
  1. String routePath,
  2. {required Handler? handler,
  3. TransitionType? transitionType,
  4. Duration transitionDuration = defaultTransitionDuration,
  5. RouteTransitionsBuilder? transitionBuilder}
)

Creates a PageRoute definition for the passed RouteHandler. You can optionally provide a default transition type.

Implementation

void define(String routePath,
    {required Handler? handler,
    TransitionType? transitionType,
    Duration transitionDuration = defaultTransitionDuration,
    RouteTransitionsBuilder? transitionBuilder}) {
  _routeTree.addRoute(
    AppRoute(routePath, handler,
        transitionType: transitionType,
        transitionDuration: transitionDuration,
        transitionBuilder: transitionBuilder),
  );
}