CaptainConfig constructor

CaptainConfig(
  1. List<Page> _pages, {
  2. bool? popPage(
    1. Route,
    2. dynamic,
    3. List<Page>
    )?,
  3. Future<bool>? shouldPop(
    1. List<Page> pages
    )?,
  4. Map<dynamic, List<Page> Function(List<Page> pages)>? actions,
  5. Future<Page> parseRouteInformation(
    1. RouteInformation routeInformation,
    2. List<Page> pages
    )?,
  6. RouteInformation? initialRouteInformation,
  7. RouteInformation restoreRouteInformation(
    1. Page page
    )?,
  8. List<void Function(List<Page> pages)>? observers,
  9. CaptainRouteParser? routeParser,
})

Implementation

CaptainConfig(
  /// stack of pages to be initially built
  this._pages, {

  /// function that decides how to pop a page off the page stack
  this.popPage,

  /// function that decides on if the current page that received a pop request should be popped or not (if false the app closes)
  this.shouldPop,

  /// set of actions that can be invoked by Navigator.of().invokeAction('key')
  this.actions,

  /// asynchronously returns a page for a new routeinformation coming in which will be set as a new route path
  this.parseRouteInformation,

  /// the initial routeinformation the app should start with
  this.initialRouteInformation,

  /// how to restore the routeinformation
  this.restoreRouteInformation,
  this.observers,
  this.routeParser,
});