CountryCodePickerJetpackCompose

Country Code Picker by Jetpack Compose

How to add in your project

Step 1. Add the JitPack repository to your build file

Add it in your root build.gradle at the end of repositories:

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Step 2. Add the dependency

dependencies {
        implementation 'com.github.Appleader707:CountryCodePickerJetpackCompose:Tag'
}

How to use ?

val countryCode = CountryCodePicker() // create a new Object
countryCode.CountryCodeDialog(
     pickedCountry = {
         Log.v("TAG", "country name is : ${it.countryName}")
     },
     defaultSelectedCountry = getListCountries().single { it.countryCode == "ir" },
     dialogSearch = true,
     dialogRounded = 22
 )

Preview

GitHub

View Github