RouterConfig<T> constructor Null safety

const RouterConfig<T>(
  1. {RouteInformationProvider? routeInformationProvider,
  2. RouteInformationParser<T>? routeInformationParser,
  3. required RouterDelegate<T> routerDelegate,
  4. BackButtonDispatcher? backButtonDispatcher}
)

Creates a RouterConfig.

The routerDelegate must not be null. The backButtonDispatcher, routeInformationProvider, and routeInformationParser are optional.

The routeInformationProvider and routeInformationParser must both be provided or not provided.

Implementation

const RouterConfig({
  this.routeInformationProvider,
  this.routeInformationParser,
  required this.routerDelegate,
  this.backButtonDispatcher,
}) : assert((routeInformationProvider == null) == (routeInformationParser == null));