BoomerangStore

Interface for a key-value store that stores navigation results as Boomerang objects. This store is used to pass data between different parts of the application.

This interface is available on all supported platforms (Android, iOS, Desktop).

Inheritors

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun dropValue(key: String)

Removes a value for the given key.

Link copied to clipboard
abstract fun getValue(key: String): Boomerang?

Retrieves a Boomerang value for the given key.

Link copied to clipboard
abstract fun packState(): Boomerang

Packs the current state of the store into a Boomerang object. This is useful for saving the state of the store for later restoration.

Link copied to clipboard
abstract fun restoreState(boomerang: Boomerang)

Restores the state of the store from a Boomerang object. This is useful for restoring a previously saved state.

Link copied to clipboard
abstract fun storeEvent(key: String)

Stores an event notification with the given key. Unlike storeValue, this method doesn't require a value parameter as it creates a simple event notification without additional data.

Link copied to clipboard
abstract fun storeValue(key: String, value: Boomerang)

Stores a Boomerang value with the given key.

Link copied to clipboard
fun BoomerangStore.storeValue(key: String, bundle: Bundle)

Stores an Android Bundle in a BoomerangStore with the given key.

inline fun BoomerangStore.storeValue(key: String, resultBuilder: Boomerang.() -> Unit)

Extension function for BoomerangStore that allows storing a value using a builder function. This is a convenient way to create and store a Boomerang in a single expression.

Link copied to clipboard
open fun tryConsumeValue(key: String, catcher: BoomerangCatcher)

Tries to consume a value using a BoomerangCatcher. Default implementation drops the value if it's caught (catcher returns true).