define method

void define (
  1. String routePath,
  2. {@required Handler handler,
  3. TransitionType transitionType}
)

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}) {
  _routeTree.addRoute(
    AppRoute(routePath, handler, transitionType: transitionType),
  );
}