KomposeCountryCodePicker
KomposeCountryCodePicker is a composable that displays a text field with a country code picker dialog.
All lambda parameters (onValueChange, placeholder, trailingIcon, countrySelectionDialogTitle, countrySelectionDialogBackIcon, countrySelectionDialogSearchIcon) are invoked synchronously on the main thread during composition. Exceptions thrown inside these lambdas will propagate to the caller and may crash the composition — callers should handle their own errors.
Parameters
The state of the country code picker.
The text to be displayed in the text field.
Modifier to be applied to the layout.
Called on the main thread when the text field value changes. The new value is passed as a parameter. Exceptions thrown in this lambda will propagate to the caller.
If true, the text field will be displayed in the error state.
If true, only the country code picker will be displayed without the text field.
The shape of the text field's outline.
A composable lambda invoked during composition to display the placeholder in the text field. Receives the current country code as a parameter.
The colors to be used to display the text field.
The trailing icon to be displayed in the text field.
The color of the country selection dialog container.
The color of the country selection dialog content.
A composable lambda to display the title of the country selection dialog.
A composable lambda to display the back icon in the country selection dialog.
A composable lambda to display the search icon in the country selection dialog.
The MutableInteractionSource representing the stream of Interactions for this text field.
The size of the selected country flag (width and height in androidx.compose.ui.unit.Dp).
The style to be used for displaying text on the TextField and the selected country.
Controls the enabled state of the text field.
The keyboard options to be used for the text field.
The keyboard actions to be used for the text field.