Kwik Country Picker
fun KwikCountryPicker(initialCountry: KwikCountry? = null, showFlags: Boolean = false, title: String = "Select your country", countryPicked: (KwikCountryInfo) -> Unit)
A country picker component that allows users to select a country from a list.
This component displays a button with the selected country's code and dialing code.
Parameters
initial Country
the country to be displayed initially. If not provided, the library will try to use the device's country code. If it's also not available, it will default to Rwanda (RW).
show Flags
a flag indicating whether to show country flags or not. Defaults to false.
country Picked
a callback function that will be triggered when a country is selected. Returns the selected country information KwikCountryInfo.
Usage:
KwikCountryPicker(
initialCountry = KwikCountry.RW,
title = "Select your country",
countryPicked = { countryInfo ->
// Handle the selected country information
}
)
Content copied to clipboard