ContentApp.custom constructor

ContentApp.custom({
  1. required List<RouteLoader> loaders,
  2. bool eagerlyLoadAllPages = false,
  3. ConfigResolver configResolver = _defaultConfigResolver,
  4. Component routerBuilder(
    1. List<List<RouteBase>> routes
    ) = _defaultRouterBuilder,
})

Creates a ContentApp.

Implementation

ContentApp.custom({
  /// A list of [RouteLoader]s to load pages from.
  required this.loaders,

  /// Whether to eagerly load all pages at startup. See the discussion on [ContentApp] for more information.
  this.eagerlyLoadAllPages = false,

  /// A function to resolve the configuration for a page based on its url.
  ///
  /// Use [PageConfig.all] to resolve the same config for all pages.
  this.configResolver = _defaultConfigResolver,

  /// A custom builder function to use for building the main [Router] component.
  ///
  /// This can be used to customize the [Router] component like add additional routes or inserting components above the router.
  this.routerBuilder = _defaultRouterBuilder,
}) {
  _overrideGlobalOptions();
}