RouterOutlet<TDelegate extends RouterDelegate<T>, T extends Object> constructor Null safety

RouterOutlet<TDelegate extends RouterDelegate<T>, T extends Object>(
  1. {TDelegate? delegate,
  2. required Iterable<GetPage> pickPages(
    1. T currentNavStack
    ),
  3. required Widget pageBuilder(
    1. BuildContext context,
    2. TDelegate,
    3. Iterable<GetPage>? page
    )}
)

Implementation

RouterOutlet({
  TDelegate? delegate,
  required Iterable<GetPage> Function(T currentNavStack) pickPages,
  required Widget Function(
    BuildContext context,
    TDelegate,
    Iterable<GetPage>? page,
  )
      pageBuilder,
}) : this.builder(
        builder: (context, rDelegate, currentConfig) {
          var picked =
              currentConfig == null ? null : pickPages(currentConfig);
          if (picked?.length == 0) {
            picked = null;
          }
          return pageBuilder(context, rDelegate, picked);
        },
        delegate: delegate,
      );