createNode method

  1. @override
RouteNode<RouteValue> createNode({
  1. RouteNode<RouteValue>? next,
  2. ShellValue? value,
  3. Completer? popCompleter,
})
override

Implementation

@override
RouteNode createNode({
  RouteNode? next,
  ShellValue? value,
  Completer? popCompleter,
}) {
  return ShellNode(
    shellBuilder: shellBuilder,
    value: switch ((next, value)) {
      (final next?, final value?) => value.withNext(next),
      (final next?, null) => ShellValue.fromNext(
          key: key,
          tabRoutes: tabs,
          next: next,
        ),
      (null, final value?) => value,
      (null, null) => value = ShellValue.def(key: key, tabs: tabs),
    },
    route: this,
    popCompleter: popCompleter,
  );
}