Package-level declarations

Types

Link copied to clipboard

CountryCodePicker is an interface that provides the different utilities for the country code picker.

Link copied to clipboard

KomposeCountryCodePickerDefaults is a class that holds the default values for the country code picker.

Functions

Link copied to clipboard
fun CountrySelectionDialog(countryList: List<Country>, containerColor: Color, contentColor: Color, onDismissRequest: () -> Unit, onSelect: (item: Country) -> Unit, modifier: Modifier = Modifier, properties: DialogProperties = DialogProperties().let { DialogProperties( dismissOnBackPress = it.dismissOnBackPress, dismissOnClickOutside = it.dismissOnClickOutside, securePolicy = it.securePolicy, usePlatformDefaultWidth = false, ) })
Link copied to clipboard
fun KomposeCountryCodePicker(state: CountryCodePicker, text: String, onValueChange: (String) -> Unit, modifier: Modifier = Modifier, error: Boolean = false, showOnlyCountryCodePicker: Boolean = false, shape: Shape = MaterialTheme.shapes.medium, placeholder: @Composable (defaultLang: String) -> Unit = { defaultLang -> DefaultPlaceholder(defaultLang) }, colors: TextFieldColors = TextFieldDefaults.colors(), trailingIcon: @Composable () -> Unit? = null, countrySelectionDialogContainerColor: Color = MaterialTheme.colorScheme.background, countrySelectionDialogContentColor: Color = MaterialTheme.colorScheme.onBackground, interactionSource: MutableInteractionSource = MutableInteractionSource(), selectedCountryFlagSize: FlagSize = FlagSize(28.dp, 18.dp), textStyle: TextStyle = LocalTextStyle.current)

KomposeCountryCodePicker is a composable that displays a text field with a country code picker dialog. state The state of the country code picker. text The text to be displayed in the text field. onValueChange Called when the value is changed. modifier Modifier to be applied to the layout. error If true, the text field will be displayed in the error state. showOnlyCountryCodePicker If true, only the country code picker will be displayed. shape The shape of the text field's outline. placeholder The placeholder to be displayed in the text field. colors The colors to be used to display the text field. trailingIcon The trailing icon to be displayed in the text field. countrySelectionDialogContainerColor The color to be used to display the country selection dialog container. countrySelectionDialogContentColor The color to be used to display the country selection dialog content. text. interactionSource The MutableInteractionSource representing the stream of Interactions for this text field. selectedCountryFlagSize The size of the selected country flag (width and height in .dp). textStyle The style to be used for displaying text on the TextField and the selected country.

Link copied to clipboard
fun rememberKomposeCountryCodePickerState(defaultCountryCode: String? = null, limitedCountries: List<String> = emptyList(), showCountryCode: Boolean = true, showCountryFlag: Boolean = true): CountryCodePicker

Creates a CountryCodePicker that is remembered across compositions.