define method

void define (
  1. String routePath,
  2. {@required Handler handler,
  3. TransitionType transitionType,
  4. Duration transitionDuration = const Duration(milliseconds: 250),
  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 = const Duration(milliseconds: 250),
    RouteTransitionsBuilder transitionBuilder}) {
  _routeTree.addRoute(
    AppRoute(routePath, handler,
        transitionType: transitionType,
        transitionDuration: transitionDuration,
        transitionBuilder: transitionBuilder),
  );
}