calculateSupportingPaneScaffoldState

Composable Function
Android
@ExperimentalMaterial3AdaptiveApi
@Composable
fun calculateSupportingPaneScaffoldState(
    currentDestination: ThreePaneScaffoldDestinationItem<*> =
        ThreePaneScaffoldDestinationItem(SupportingPaneScaffoldRole.Main, null),
    scaffoldDirective: PaneScaffoldDirective =
        calculateStandardPaneScaffoldDirective(currentWindowAdaptiveInfo()),
    adaptStrategies: ThreePaneScaffoldAdaptStrategies =
        SupportingPaneScaffoldDefaults.adaptStrategies()
): ThreePaneScaffoldState

This function calculates ThreePaneScaffoldValue based on the given PaneScaffoldDirective, ThreePaneScaffoldAdaptStrategies, and the current pane destination of a SupportingPaneScaffold.

Parameters

currentDestination the current destination item, which will be guaranteed to have the highest priority when deciding pane visibilities.
scaffoldDirective the layout directives that the associated SupportingPaneScaffold needs to follow. The default value will be the calculation result from calculateStandardPaneScaffoldDirective with the current window configuration, and will be automatically updated when the window configuration changes.
adaptStrategies the ThreePaneScaffoldAdaptStrategies should be used by scaffold panes.
Android
@ExperimentalMaterial3AdaptiveApi
@Composable
fun calculateSupportingPaneScaffoldState(
    destinationHistory: List<ThreePaneScaffoldDestinationItem<*>>,
    scaffoldDirective: PaneScaffoldDirective =
        calculateStandardPaneScaffoldDirective(currentWindowAdaptiveInfo()),
    adaptStrategies: ThreePaneScaffoldAdaptStrategies =
        SupportingPaneScaffoldDefaults.adaptStrategies()
): ThreePaneScaffoldState

This function calculates ThreePaneScaffoldValue based on the given PaneScaffoldDirective, ThreePaneScaffoldAdaptStrategies, and the pane destination history of a SupportingPaneScaffold.

Parameters

destinationHistory The history of past destination items. The last destination will have the highest priority, and the second last destination will have the second highest priority, and so forth until all panes have a priority assigned. Note that the last destination is supposed to be the last item of the provided list. When the history is empty or there are panes left unassigned, default priorities will be assigned to those panes in the order of Main > Supporting > Extra.
scaffoldDirective the layout directives that the associated SupportingPaneScaffold needs to follow. The default value will be the calculation result from calculateStandardPaneScaffoldDirective with the current window configuration, and will be automatically updated when the window configuration changes.
adaptStrategies the ThreePaneScaffoldAdaptStrategies should be used by scaffold panes.