StoragePermissionStateRepo

class StoragePermissionStateRepo(storagePermission: StoragePermission, builder: BaseStoragePermissionManagerBuilder, monitoringInterval: Duration = defaultMonitoringInterval, settings: BasePermissionManager.Settings = BasePermissionManager.Settings(), coroutineContext: CoroutineContext) : PermissionStateRepo<StoragePermission>

A PermissionStateRepo for StoragePermission

Parameters

storagePermission

the StoragePermission to manage

builder

The StoragePermissionManagerBuilder for creating the StoragePermissionManager associated with the permission

monitoringInterval

the Duration after which the system should poll for changes to the permission if automatic detection is impossible.

settings

the BasePermissionManager.Settings used by the StoragePermissionManager created by the builder

coroutineContext

The CoroutineContext to run the state machine on.

Constructors

Link copied to clipboard
constructor(storagePermission: StoragePermission, builder: BaseStoragePermissionManagerBuilder, monitoringInterval: Duration = defaultMonitoringInterval, settings: BasePermissionManager.Settings = BasePermissionManager.Settings(), coroutineContext: CoroutineContext)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val lazyMutableFlow: Lazy<MutableStateFlow<PermissionState<StoragePermission>>>
Link copied to clipboard
open override val stateFlow: StateFlow<PermissionState<StoragePermission>>
Link copied to clipboard
val subscriptionCount: StateFlow<Int>

Functions

Link copied to clipboard
open suspend override fun collect(collector: FlowCollector<PermissionState<StoragePermission>>): Nothing
Link copied to clipboard
open suspend override fun firstCollection()
Link copied to clipboard
Link copied to clipboard
open suspend override fun laterCollections(): PermissionState<StoragePermission>
Link copied to clipboard
fun <K : PermissionState<StoragePermission>> launchTakeAndChangeState(context: CoroutineContext, remainIfStateNot: KClass<K>, action: suspend (K) -> suspend () -> PermissionState<StoragePermission>): Job
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun <Result> useState(action: suspend (PermissionState<StoragePermission>) -> Result): Result