Navigator constructor

const Navigator(
  1. {Key key,
  2. String initialRoute,
  3. @required RouteFactory onGenerateRoute,
  4. RouteFactory onUnknownRoute,
  5. List<NavigatorObserver> observers: const []}
)

Creates a widget that maintains a stack-based history of child widgets.

The onGenerateRoute argument must not be null.

Implementation

const Navigator({
  Key key,
  this.initialRoute,
  @required this.onGenerateRoute,
  this.onUnknownRoute,
  this.observers = const <NavigatorObserver>[],
}) : assert(onGenerateRoute != null),
     super(key: key);