ScreenDataHolder

Screen-scoped, in-memory data store — same flat/segmented shape as ApplicationDataHolder, but one fresh instance per screen, discarded when the screen leaves the back stack. Backs the server DSL's screenPlainData()/screenSegmentedData(segmentId) data sources, plus the read-only screenNavigationData() for arguments the screen was navigated to with. Reached in event execution directly as EventRunningScope.screenDataHolder — there's no get<ScreenDataHolder>() Koin lookup, since a new instance is created per screen rather than being a single app-wide binding.

Inheritors

Functions

Link copied to clipboard
abstract fun addPlainData(data: Any?, dataId: String)

Writes data under dataId in this screen's flat store, overwriting any existing value. The mechanism behind UpdateData targeting screenPlainData().

Link copied to clipboard
abstract fun addSegmentedData(data: Any?, segmentId: String, dataId: String)

Writes data under dataId within this screen's segmentId namespace, overwriting any existing value. The mechanism behind UpdateData targeting screenSegmentedData(segmentId).

Link copied to clipboard

Every navigation argument this screen was opened with.

Link copied to clipboard
abstract fun getAllPlainData(): Map<String, Any?>

Every flat entry currently stored on this screen, keyed by data id.

Link copied to clipboard
abstract fun getAllSegmentedData(segmentId: String): Map<String, Any?>?

Every entry currently stored within segmentId, keyed by data id.

Link copied to clipboard
abstract fun getNavigationData(dataId: String): Any?

Reads the navigation argument dataId this screen was opened with — read-only, there is no add/remove counterpart, since navigation arguments are fixed for the lifetime of a screen instance. The mechanism behind GetData's screenNavigationData() data source.

Link copied to clipboard
abstract fun getPlainData(dataId: String): Any?

Reads the flat entry stored under dataId.

Link copied to clipboard
abstract fun getSegmentedData(dataId: String, segmentId: String): Any?

Reads the entry stored under dataId within segmentId.

Link copied to clipboard
abstract fun removePlainData(dataId: String)

Removes the flat entry stored under dataId, if any.

Link copied to clipboard
abstract fun removeSegmentedData(segmentId: String, dataId: String)

Removes the entry stored under dataId within segmentId, if any.

Link copied to clipboard
abstract fun wipePlainData()

Clears every flat entry on this screen.

Link copied to clipboard
abstract fun wipeSegmentedData()

Clears every segment on this screen entirely — every namespace, not just one.

abstract fun wipeSegmentedData(segmentId: String)

Clears every entry within segmentId on this screen, leaving other segments untouched.