KwikCountryPicker

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

initialCountry

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).

showFlags

a flag indicating whether to show country flags or not. Defaults to false.

countryPicked

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
}
)