BackstackManager

Manager for backstack. Implementations of this interface are responsible to coordinate undo and redo requests.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val canRedo: StateFlow<Boolean>

Notifies if it is possible to redo an action.

Link copied to clipboard
abstract val canUndo: StateFlow<Boolean>

Notifies if it is possible to undo an action.

Functions

Link copied to clipboard
abstract fun addAction(action: BackstackAction)

Adds an action to the backstack.

Link copied to clipboard
abstract fun nextState(state: StoryState): StoryState

Moves to the next state available. It is only possible to move the next state if the user has undone an action.

Link copied to clipboard
abstract fun previousState(state: StoryState): StoryState

Moves to the previous state available.