AppRouterDelegate constructor

AppRouterDelegate({
  1. required Map<String, WidgetBuilder> routes,
  2. void add(
    1. VoidCallback listener
    )?,
  3. void remove(
    1. VoidCallback listener
    )?,
})

Provide the Map of 'Routes' as well as ADD and Remove routines.

Implementation

factory AppRouterDelegate({
  required Map<String, WidgetBuilder> routes,
  void Function(VoidCallback listener)? add,
  void Function(VoidCallback listener)? remove,
}) =>
    _this ??= AppRouterDelegate._(
      routes: routes,
      add: add,
      remove: remove,
    );