Package-level declarations

Types

Link copied to clipboard
interface AwaitHost

A host to manage the await state of a key.

Link copied to clipboard
object CatchScope

A scope for handling error content within the Catch function.

Link copied to clipboard

A host to manage the caught errors of a key.

Link copied to clipboard
class ErrorBoundaryContext(val err: Throwable, val reset: () -> Unit?)

Context information to pass to the fallback UI of ErrorBoundary.

Link copied to clipboard
Link copied to clipboard
sealed interface LazyLoadDirection
Link copied to clipboard
value class LazyLoadThreshold(val value: Float)
Link copied to clipboard
sealed class Loadable<out T> : DataModel<T>

Promise-like data structure that represents the state of a value that is being loaded.

Link copied to clipboard

State of the Suspense.

Properties

Link copied to clipboard

Functions

Link copied to clipboard
inline fun <T> Await(state: DataModel<T>, key: Any? = null, host: AwaitHost = LocalAwaitHost.current, crossinline content: @Composable (data: T) -> Unit)

Await for a DataModel to be fulfilled.

inline fun <T1, T2> Await(state1: DataModel<T1>, state2: DataModel<T2>, key: Any? = null, host: AwaitHost = LocalAwaitHost.current, crossinline content: @Composable (data1: T1, data2: T2) -> Unit)

Await for two DataModel to be fulfilled.

inline fun <T1, T2, T3> Await(state1: DataModel<T1>, state2: DataModel<T2>, state3: DataModel<T3>, key: Any? = null, host: AwaitHost = LocalAwaitHost.current, crossinline content: @Composable (data1: T1, data2: T2, data3: T3) -> Unit)

Await for three DataModel to be fulfilled.

Link copied to clipboard
fun Catch(vararg states: DataModel<*>, isEnabled: Boolean = true, content: @Composable CatchScope.(err: Throwable) -> Unit = { Throw(error = it) })
fun <T : Throwable> Catch(vararg states: DataModel<*>, filterIsInstance: (err: Throwable) -> T?, isEnabled: Boolean = true, content: @Composable CatchScope.(err: T) -> Unit = { Throw(error = it) })
fun Catch(state1: DataModel<*>, state2: DataModel<*>, isEnabled: Boolean = true, content: @Composable CatchScope.(err: Throwable) -> Unit = { Throw(error = it) })
fun <T : Throwable> Catch(state1: DataModel<*>, state2: DataModel<*>, filterIsInstance: (err: Throwable) -> T?, isEnabled: Boolean = true, content: @Composable CatchScope.(err: T) -> Unit = { Throw(error = it) })
fun Catch(state1: DataModel<*>, state2: DataModel<*>, state3: DataModel<*>, isEnabled: Boolean = true, content: @Composable CatchScope.(err: Throwable) -> Unit = { Throw(error = it) })
fun <T : Throwable> Catch(state1: DataModel<*>, state2: DataModel<*>, state3: DataModel<*>, filterIsInstance: (err: Throwable) -> T?, isEnabled: Boolean = true, content: @Composable CatchScope.(err: T) -> Unit = { Throw(error = it) })

Catch for any DataModels to be rejected.

fun Catch(state: DataModel<*>, isEnabled: Boolean = true, content: @Composable CatchScope.(err: Throwable) -> Unit = { Throw(error = it) })
fun <T : Throwable> Catch(state: DataModel<*>, filterIsInstance: (err: Throwable) -> T?, isEnabled: Boolean = true, content: @Composable CatchScope.(err: T) -> Unit = { Throw(error = it) })

Catch for a DataModel to be rejected.

Link copied to clipboard
fun ContentVisibility(hidden: Boolean, modifier: Modifier = Modifier, content: @Composable () -> Unit)

A composable that can hide its content without removing it from the layout.

Link copied to clipboard
fun ErrorBoundary(modifier: Modifier = Modifier, fallback: @Composable BoxScope.(ctx: ErrorBoundaryContext) -> Unit? = null, onError: (err: Throwable) -> Unit? = null, onReset: () -> Unit? = null, state: ErrorBoundaryState = remember { ErrorBoundaryState() }, content: @Composable () -> Unit)

Wrap an ErrorBoundary around other Catch composable functions to catch errors and render a fallback UI.

Link copied to clipboard
inline fun <T : Any, S : ScrollableState> LazyLoadCustomEffect(state: S, noinline loadMore: suspend (T) -> Unit, loadMoreParam: T?, totalItemsCount: Int, threshold: LazyLoadThreshold = LazyLoadThreshold.Lazily, direction: LazyLoadDirection = LazyLoadDirection.Forward, crossinline computeVisibleItemIndex: (state: S) -> Int)

Provides a LaunchedEffect to perform additional loading for soil.query.compose.InfiniteQueryObject.

Link copied to clipboard
inline fun <T : Any> LazyLoadEffect(state: LazyListState, noinline loadMore: suspend (T) -> Unit, loadMoreParam: T?, totalItemsCount: Int, threshold: LazyLoadThreshold = LazyLoadThreshold.Lazily, direction: LazyLoadDirection = LazyLoadDirection.Forward, crossinline computeVisibleItemIndex: (state: LazyListState) -> Int = { it.firstVisibleItemIndex + it.layoutInfo.visibleItemsInfo.size / 2 })
inline fun <T : Any> LazyLoadEffect(state: LazyGridState, noinline loadMore: suspend (T) -> Unit, loadMoreParam: T?, totalItemsCount: Int, threshold: LazyLoadThreshold = LazyLoadThreshold.Lazily, direction: LazyLoadDirection = LazyLoadDirection.Forward, crossinline computeVisibleItemIndex: (state: LazyGridState) -> Int = { it.firstVisibleItemIndex + it.layoutInfo.visibleItemsInfo.size / 2 })

Provides a LaunchedEffect to perform additional loading for soil.query.compose.InfiniteQueryObject.

Link copied to clipboard

Returns a DataModel that represents no data.

Link copied to clipboard

Returns a DataModel that represents pending data.

Link copied to clipboard
fun Suspense(fallback: @Composable BoxScope.() -> Unit, modifier: Modifier = Modifier, state: SuspenseState = remember { SuspenseState() }, contentThreshold: Duration = 3.seconds, content: @Composable () -> Unit)

Suspense render a fallback UI while some asynchronous work is being done.