Tracker

class Tracker(defaultTransaction: String, debounceTimeout: Long)

tracks running transactions (e.g. inside a Store)

Parameters

defaultTransaction

default transactions text (used if not specified when track is called)

debounceTimeout

denounces values in the Flow of running transaction by this value

Constructors

Link copied to clipboard
fun Tracker(defaultTransaction: String, debounceTimeout: Long)

Functions

Link copied to clipboard
operator fun invoke(transaction: String): Flow<Boolean>

Gives a Flow to check, if a certain transaction is running

Link copied to clipboard
suspend fun <T> track(transaction: String = defaultTransaction, operation: suspend () -> T): T

Tracks a given operation.

Properties

Link copied to clipboard

Represents the current transaction which is running or null.

Link copied to clipboard
val data: Flow<Boolean>

Gives a Flow to check if a transaction is running.