BasePlaybackStateRepo
abstract class BasePlaybackStateRepo(createInitialState: HotStateFlowRepo<PlaybackState>.() -> PlaybackState, coroutineContext: CoroutineContext) : HotStateFlowRepo<PlaybackState>
An abstract ColdStateFlowRepo for managing PlaybackState
Parameters
createInitialState
method for creating the initial PlaybackState given an implementation of this HotStateFlowRepo
coroutineContext
the CoroutineContext the CoroutineContext used to create a coroutine scope for this state machine.
Inheritors
Constructors
Link copied to clipboard
constructor(createInitialState: HotStateFlowRepo<PlaybackState>.() -> PlaybackState, coroutineContext: CoroutineContext)
Properties
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun launchTakeAndChangeState(context: CoroutineContext, action: suspend (PlaybackState) -> suspend () -> PlaybackState): Job
fun <K : PlaybackState> launchTakeAndChangeState(context: CoroutineContext, remainIfStateNot: KClass<K>, action: suspend (K) -> suspend () -> PlaybackState): Job
Link copied to clipboard
fun <Result> launchUseState(context: CoroutineContext, action: suspend (PlaybackState) -> Result): Job
Link copied to clipboard
Link copied to clipboard
suspend fun takeAndChangeState(action: suspend (PlaybackState) -> suspend () -> PlaybackState): PlaybackState
suspend fun <K : PlaybackState> takeAndChangeState(remainIfStateNot: KClass<K>, action: suspend (K) -> suspend () -> PlaybackState): PlaybackState