maintainState property

bool maintainState
final

Whether or not a page should be restored with its original state or rebuilt when a page on top of it is popped.

If an implicit navigator is nested within another navigator, setting this to false will mean the inner navigator loses its page history if the user navigates away from it and then presses back and returns to it.

If maintainHistory is true, then an inner nested navigator will restore it's state even if maintainState is false.

This should almost always be left as its the default value true.

See ModalRoute.maintainState.

Implementation

final bool maintainState;