OfflinePackListItem
fun OfflinePackListItem(pack: OfflinePack, offlineStorage: OfflineStorage, modifier: Modifier = Modifier, leadingContent: @Composable () -> Unit = {
OfflinePackListItemDefaults.LeadingContent(pack)
}, supportingContent: @Composable () -> Unit = {
OfflinePackListItemDefaults.SupportingContent(pack.downloadProgress.collectAsState().value)
}, trailingContent: @Composable () -> Unit = {
OfflinePackListItemDefaults.TrailingContent(pack, offlineStorage)
}, headlineContent: @Composable () -> Unit)(source)
A ListItem to manage an OfflinePack.
By default, it includes controls to pause, resume, invalidate, and delete the pack, and a CircularProgressIndicator for download progress.
Swipe the item from end to start to request deletion. The default trailing delete button and the swipe gesture both require confirmation before deleting the pack.
You can customize each part of the ListItem by supplying alternate leadingContent, supportingContent, and trailingContent.
Parameters
offlineStorage
The OfflineStorage from the org.maplibre.compose.map.MapRuntime that created pack.
headlineContent
A pack name, for example from OfflinePack.metadata.