DipNav.builder constructor

DipNav.builder({
  1. GlobalKey<NavigatorState>? key,
  2. required DipNavRoute initRoute,
  3. required Widget builder(
    1. DipNavDelegate delegate,
    2. DipNavParser parser,
    3. DipNavDispatcher dispatcher
    ),
  4. DipNavRoute? notFoundRoute,
  5. List<DipNavRoute>? routes,
  6. List<NavigatorObserver>? dipNavObservers,
  7. TransitionDelegate? transitionDelegate,
})

Builder of DipNav widget

initRoute notFoundRoute routes List of transitionDelegate

Implementation

factory DipNav.builder({
  GlobalKey<NavigatorState>? key,
  required DipNavRoute initRoute,
  required Widget Function(DipNavDelegate delegate, DipNavParser parser,
          DipNavDispatcher dispatcher)
      builder,
  DipNavRoute? notFoundRoute,
  List<DipNavRoute>? routes,
  List<NavigatorObserver>? dipNavObservers,
  TransitionDelegate<dynamic>? transitionDelegate,
}) {
  final dipNav = DipNavRouter(
    key: key,
    initRoute: initRoute,
    notFoundRoute: notFoundRoute,
    routes: routes,
    dipNavObservers: dipNavObservers,
    transitionDelegate: transitionDelegate,
  );
  return DipNav(
    key: key,
    router: dipNav,
    child: Builder(
      builder: (context) =>
          builder(dipNav.delegate, dipNav.parser, dipNav.dispatcher),
    ),
  );
}