Pager
class Pager<Key : Any, Value : Any>( scope: CoroutineScope, source: PagingDataSource<Key, Value>, initialKey: Key, config: PagingConfig = PagingConfig())
Content copied to clipboard
Primary entry point into Paging; constructor for a reactive stream of PagingData.
Each PagingData represents the current paging state and data. Pager will fetch relevant data based on PagingViewEvent received via subscribeToViewEvents
Constructors
Functions
Link copied to clipboard
suspend fun subscribeToViewEvents(eventFlow: MutableSharedFlow<PagingViewEvent>)
Content copied to clipboard
Collect events from the view to triggers page loads. Will suspend until eventFlow is terminated by sending PagingViewEvent.Terminate. This can be done by calling PagingEventEmitter.stop
Properties
Link copied to clipboard
Hot Flow of PagingData, exposing the current state & data. A new item will be emitted whenever the PagingData.LoadState or PagingData.list is updated