Await

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.

The content will be displayed when the query is fulfilled. The await will be managed by the AwaitHost.

Parameters

T

Type of data to retrieve.

state

The DataModel to await.

key

The key to identify the await.

host

The AwaitHost to manage the await. By default, it uses the LocalAwaitHost.

content

The content to display when the query is 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.

The content will be displayed when the queries are fulfilled. The await will be managed by the AwaitHost.

Parameters

T1

Type of data to retrieve.

T2

Type of data to retrieve.

state1

The first DataModel to await.

state2

The second DataModel to await.

key

The key to identify the await.

host

The AwaitHost to manage the await. By default, it uses the LocalAwaitHost.

content

The content to display when the queries are 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.

The content will be displayed when the queries are fulfilled. The await will be managed by the AwaitHost.

Parameters

T1

Type of data to retrieve.

T2

Type of data to retrieve.

T3

Type of data to retrieve.

state1

The first DataModel to await.

state2

The second DataModel to await.

state3

The third DataModel to await.

key

The key to identify the await.

host

The AwaitHost to manage the await. By default, it uses the LocalAwaitHost.

content

The content to display when the queries are fulfilled.