Package-level declarations

Types

Link copied to clipboard
class AndroidBoomerang(val bundle: Bundle = Bundle()) : Boomerang

Android-specific implementation of the Boomerang interface that uses Android's Bundle for storage.

Link copied to clipboard
class AndroidBoomerangLogger(level: LogLevel = LogLevel.DEBUG) : BoomerangLogger

Android-specific implementation of BoomerangLogger that uses Android's Log utility.

Link copied to clipboard
interface Boomerang

A key-value store for storing and retrieving data across different parts of your application. This interface is implemented by platform-specific classes to provide a consistent API across all platforms.

Link copied to clipboard
fun interface BoomerangCatcher

A functional interface for catching and processing Boomerang values from a BoomerangStore. Implementations of this interface determine whether a Boomerang value should be "caught" (processed and removed).

Link copied to clipboard

Configuration object for the Boomerang library.

Link copied to clipboard
actual object BoomerangFactory

Android-specific implementation of the BoomerangFactory.

expect object BoomerangFactory

Factory for creating platform-specific Boomerang instances.

actual object BoomerangFactory

Desktop-specific implementation of the BoomerangFactory.

actual object BoomerangFactory

iOS-specific implementation of the BoomerangFactory.

Link copied to clipboard
interface BoomerangLogger

Interface for logging operations within the Boomerang library.

Link copied to clipboard
interface 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.

Link copied to clipboard

Interface for a component that hosts a BoomerangStore. This interface is typically implemented by Activities or other lifecycle-aware components that need to provide a BoomerangStore to their children Fragments. Implementation of this interface is required for Fragments and mixed navigation result to work. In order to create instance and save instance state of DefaultBoomerangStore check createOrRestoreDefaultBoomerangStore and saveDefaultBoomerangStoreState in fragment module. Example implementation

Link copied to clipboard

Default implementation of the BoomerangStore interface. Uses a private mutable map to store key-value pairs.

Link copied to clipboard

Defines the available log levels for Android logging.

Link copied to clipboard

A platform-agnostic implementation of the Boomerang interface that uses a MutableMap for storage.

Functions

Link copied to clipboard
fun Lifecycle.Event.assertValidForBoomerangCatcher()

Asserts that the lifecycle event is valid for catching a boomerang. Valid events are ON_START and ON_RESUME.

Link copied to clipboard
actual fun boomerangOf(vararg pairs: Pair<String, Any>): Boomerang

Android-specific implementation of boomerangOf that adds support for Parcelable, Serializable, and Bundle types.

expect fun boomerangOf(vararg pairs: Pair<String, Any>): Boomerang

Creates a new Boomerang instance with the provided key-value pairs.

actual fun boomerangOf(vararg pairs: Pair<String, Any>): Boomerang

Desktop-specific implementation of boomerangOf.

actual fun boomerangOf(vararg pairs: Pair<String, Any>): Boomerang

iOS-specific implementation of boomerangOf.

Link copied to clipboard
inline fun buildBoomerang(builder: Boomerang.() -> Unit): Boomerang

Creates a new Boomerang instance and configures it using the provided builder function.

Link copied to clipboard

Creates a new empty Boomerang instance.

Link copied to clipboard
inline fun eventBoomerangCatcher(key: String, crossinline onEvent: () -> Unit): BoomerangCatcher

Creates a BoomerangCatcher specifically for handling event notifications. This catcher checks if the Boomerang contains an event with the specified key and calls the provided callback when the event is caught.

Link copied to clipboard
fun Boomerang.getBundle(key: String): Bundle?

Retrieves an Android Bundle from the Boomerang with the given key.

Link copied to clipboard

Retrieves a Java Serializable object from the Boomerang with the given key.

Link copied to clipboard
inline fun <T : Parcelable> Boomerang.getParcelable(key: String): T?

Retrieves a Parcelable object from the Boomerang with the given key.

Link copied to clipboard
fun Boomerang.putBundle(key: String, value: Bundle)

Stores an Android Bundle in the Boomerang with the given key.

Link copied to clipboard

Stores a Java Serializable object in the Boomerang with the given key.

Link copied to clipboard
fun <T : Parcelable> Boomerang.putParcelable(key: String, value: T)

Stores a Parcelable object in the Boomerang 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

Converts an Android Bundle to an AndroidBoomerang.

Link copied to clipboard
fun Boomerang.toBundle(): Bundle

Converts a Boomerang to an Android Bundle.