Updated on 2026-08-14
This commit is contained in:
parent
99dfa2a392
commit
e511e84508
12 changed files with 238 additions and 92 deletions
|
|
@ -0,0 +1,26 @@
|
|||
package com.tangem.core.ui.decompose
|
||||
|
||||
import androidx.compose.foundation.lazy.LazyListScope
|
||||
import androidx.compose.runtime.Stable
|
||||
import androidx.compose.ui.Modifier
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
|
||||
@Stable
|
||||
interface ComposableListContentComponent<T> {
|
||||
|
||||
val uiState: StateFlow<T>
|
||||
|
||||
fun LazyListScope.content(uiState: T, modifier: Modifier)
|
||||
|
||||
companion object {
|
||||
val EMPTY = EmptyComposableListContentComponent
|
||||
}
|
||||
}
|
||||
|
||||
object EmptyComposableListContentComponent : ComposableListContentComponent<Unit> {
|
||||
override val uiState: StateFlow<Unit> = MutableStateFlow(Unit)
|
||||
|
||||
override fun LazyListScope.content(uiState: Unit, modifier: Modifier) { /* no-op */
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue