Router constructor

const Router({
  1. required RouterState state,
  2. required GlobalKey<NavigatorState> navigatorKey,
  3. required List<NavigatorObserver> observers(),
  4. Key? key,
})

Creates a Router.

Implementation

const Router({
  required RouterState state,
  required GlobalKey<NavigatorState> navigatorKey,
  required List<NavigatorObserver> Function() observers,
  Key? key,
})  : _state = state,
      _navigatorKey = navigatorKey,
      _observers = observers,
      super(key: key);