InfinityPagedComponent

Composable function for managing an infinitely paged component.

Parameters

block

Composable function that renders the UI with the loaded data. When data is in loading state, block will receive null as it parameter

Type Parameters

T

The type of the paginated data.


fun <T> InfinityPagedComponent(page: Int, size: Int, loader: suspend InfinityPagedComponentContext<T>.(Pagination) -> PaginationResult<T>, predefinedScope: CoroutineScope? = null, block: InfinityPagedComponentContext<T>.(List<T>?) -> Unit)(source)

Composable function for managing an infinitely paged component.

Parameters

page

Initial page number.

size

Number of items per page.

loader

Suspended function that loads paginated data.

block

Composable function that renders the UI with the loaded data. When data is in loading state, block will receive null as it parameter

Type Parameters

T

The type of the paginated data.


fun <T> InfinityPagedComponent(pageInfo: Pagination, loader: suspend InfinityPagedComponentContext<T>.(Pagination) -> PaginationResult<T>, predefinedScope: CoroutineScope? = null, block: InfinityPagedComponentContext<T>.(List<T>?) -> Unit)(source)

Overloaded composable function for an infinitely paged component.

Parameters

pageInfo

Initial pagination information.

loader

Suspended function that loads paginated data.

block

Composable function that renders the UI with the loaded data. When data is in loading state, block will receive null as it parameter

Type Parameters

T

The type of the paginated data.


fun <T> InfinityPagedComponent(size: Int, loader: suspend InfinityPagedComponentContext<T>.(Pagination) -> PaginationResult<T>, predefinedScope: CoroutineScope? = null, block: InfinityPagedComponentContext<T>.(List<T>?) -> Unit)(source)

Overloaded composable function for an infinitely paged component.

Parameters

size

Number of items per page.

loader

Suspended function that loads paginated data.

block

Composable function that renders the UI with the loaded data. When data is in loading state, block will receive null as it parameter

Type Parameters

T

The type of the paginated data.