CaptainConfig constructor
CaptainConfig(
- List<
Page> _pages, { - bool? popPage()?,
- Future<
bool> ? shouldPop()?, - Map<
dynamic, List< ? actions,Page> Function(List<Page> pages)> - Future<
Page> parseRouteInformation(- RouteInformation routeInformation,
- List<
Page> pages
- RouteInformation? initialRouteInformation,
- RouteInformation restoreRouteInformation(
- Page page
- List<
void Function(List< ? observers,Page> pages)> - 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,
});