PPageStack<P extends PagePath> class

The source of pages for Navigator widget.

P is the base class for all app's page paths.

Constructors

PPageStack({required PAbstractPage<P, dynamic> bottomPage, PPageFactoryFunction<P>? createPage, DuplicatePageKeyAction onDuplicateKey = DuplicatePageKeyAction.bringOld, PageStackRouteInformationParser? routeInformationParser})

Properties

createPage → PPageFactoryFunction<P>?
A factory to create pages from their serialized states. It is called when a popped page should be re-created on back-forward navigation. If null, pages will not be re-created this way. This makes navigation useless except for popping.
final
events Stream<PageStackEvent>
no setter
hashCode int
The hash code for this object.
no setterinherited
onDuplicateKey DuplicatePageKeyAction
What to do if pushing a page with a key already existing in the stack.
final
pages UnmodifiableListView<PAbstractPage<P, dynamic>>
no setter
routeInformationParser PageStackRouteInformationParser?
Allows declarative navigation with replacePath if set.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() Future<void>
getConfiguration() PageStackConfiguration
Surveys all pages' paths for serialization.
getTopPagePath() → P
The first non-null page path from top.
handleRemoved<R>(PAbstractPage<P, dynamic>? pageBelow, PAbstractPage<P, R> page, PagePopEvent<R> event) → void
Called when a page is removed from the stack for any reason.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onBackPressed() Future<BackPressedResult>
Passes the back button event to the foreground page bloc.
popUntilBottom() → void
Pops all pages except the bottom one, top to bottom.
push<R>(PAbstractPage<P, R> page, {DuplicatePageKeyAction? onDuplicateKey}) Future<R?>
Pushes a page to the stack much like Navigator.push does.
replacePath(P path, {PageStackMatchMode mode = PageStackMatchMode.keyOrNullPathNoGap}) Future<void>
Replaces the stack of pages with the full default stack of path (declarative navigation).
setConfiguration(PageStackConfiguration configuration, {PageStackMatchMode mode = PageStackMatchMode.keyOrNullPathNoGap, PAbstractPageStackConfigurationSetter<PagePath>? setter, bool fire = true}) → void
Recovers pages and their states.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited