Package-level declarations
Types
Link copied to clipboard
object CountryPickerDefaults
Default building blocks for CountryPicker.
Link copied to clipboard
object CountrySelectorDefaults
Default building blocks for CountrySelector
Functions
Link copied to clipboard
fun CountryPicker(onClick: (Country) -> Unit, selectedCountry: Country?, modifier: Modifier = Modifier, countries: List<Country> = Country.all, locale: String? = null, searchField: @Composable (query: String, onQueryChange: (String) -> Unit) -> Unit? = { query, onQueryChange ->
CountryPickerDefaults.SearchField(query, onQueryChange)
}, searchFilter: (query: String, countries: List<Country>) -> List<Country> = { query, countries ->
countries.filterByQuery(query, locale, FilterField.country)
}, emptyContent: @Composable () -> Unit = {
CountryPickerDefaults.EmptyContent()
}, itemContent: @Composable (country: Country, selected: Boolean, onClick: () -> Unit) -> Unit = { country, selected, onClick ->
CountryPickerDefaults.CountryItem(
country = country,
selected = selected,
onClick = onClick,
locale = locale,
)
})
Searchable country picker with selectable rows.
Link copied to clipboard
fun CountrySelector(selectedCountry: Country?, onCountrySelect: (Country) -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, locale: String? = null, selectorPicker: @Composable (selectedCountry: Country?, onCountrySelect: (Country) -> Unit) -> Unit = { selectedCountry, onCountrySelect ->
CountryPicker(
selectedCountry = selectedCountry,
onClick = onCountrySelect,
modifier = Modifier
.fillMaxWidth()
.fillMaxHeight(0.75f),
locale = locale,
)
}, selectorField: @Composable (country: Country?, onClick: () -> Unit) -> Unit = { country, onClick ->
CountrySelectorDefaults.SelectorField(
country = country,
onClick = onClick,
modifier = modifier,
enabled = enabled,
locale = locale,
)
})
Country selector with a clickable field that opens a bottom sheet.
Link copied to clipboard
fun PreloadEmojiFont(loading: @Composable () -> Unit = { DefaultLoading() }, content: @Composable () -> Unit)
Preloads the Noto Color Emoji font before displaying content.
Link copied to clipboard
fun SelectorBottomSheet(onDismissRequest: () -> Unit, modifier: Modifier = Modifier, sheetState: SheetState = rememberModalBottomSheetState(skipPartiallyExpanded = true), content: @Composable (onClose: () -> Unit) -> Unit)