ThreePaneScaffoldPredictiveBackHandler

An effect to add predictive back handling to a three pane scaffold.

NavigableListDetailPaneScaffold and NavigableSupportingPaneScaffold apply this effect automatically. If instead you are using ListDetailPaneScaffold or SupportingPaneScaffold, use the overloads that accept a ThreePaneScaffoldState and pass navigator.scaffoldState to the scaffold after adding this effect to your composition.

A predictive back gesture will cause the navigator to seekBack to the previous scaffold value. The progress can be read from the progressFraction of the navigator's scaffold state. It will range from 0 (representing the start of the predictive back gesture) to some fraction less than 1 (representing a "peek" or "preview" of the previous scaffold value). If the gesture is committed, back navigation is performed. If the gesture is cancelled, the navigator's scaffold state is reset.

Parameters

navigator

The navigator instance to navigate through the scaffold.

backBehavior

The back navigation behavior when the system back event happens. See BackNavigationBehavior.