Interface

SceneStrategy

A strategy that tries to calculate a Scene given a list of NavEntrys.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Common
public fun interface SceneStrategy<T : Any>

A strategy that tries to calculate a Scene given a list of NavEntrys.

Functions

calculateScene

public fun SceneStrategyScope<T>.calculateScene(entries: List<NavEntry<T>>): Scene<T>?

Given a SceneStrategyScope, calculate whether this SceneStrategy should take on the task of rendering one or more of the entries in the scope.

By returning a non-null Scene, your Scene takes on the responsibility of rendering the set of entries you declare in Scene.entries. If you return null, the next available SceneStrategy will be called.

Parameters

entries The entries on the back stack that should be considered valid to render via a returned Scene.

then

public infix fun then(sceneStrategy: SceneStrategy<T>): SceneStrategy<T>

Chains this SceneStrategy with another sceneStrategy to return a combined SceneStrategy. For the returned SceneStrategy, calculateScene will use the first non-null result from the calculation.