AlbaRouterDelegate constructor

AlbaRouterDelegate({
  1. required RouterState routerState,
  2. GlobalKey<RouterWidgetState>? routerKey,
  3. String initialPath()?,
  4. List<NavigatorObserver> observers()?,
})

Creates a AlbaRouterDelegate.

Implementation

AlbaRouterDelegate({
  required RouterState routerState,
  GlobalKey<RouterWidgetState>? routerKey,
  String Function()? initialPath,
  List<NavigatorObserver> Function()? observers,
})  : _routerState = routerState,
      _navigatorKey = routerState._navigatorKey,
      _routerKey = routerKey,
      _initialPath = initialPath,
      _observers = observers {
  _routerState.addListener(() {
    notifyListeners();
  });
}