SelectedCountryComponent

fun SelectedCountryComponent(modifier: Modifier = Modifier, selectedCountry: Country? = countryList.find { it.code == "US" }, onSelectCountry: (Country) -> Unit = {}, countriesToShow: List<String> = emptyList(), countriesExclude: List<String> = emptyList(), pinnedCountries: List<String> = emptyList(), ccpColors: CCPColors = CCPDefaults.colors(), ccpConfig: CCPConfig = CCPDefaults.defaultConfig(), onDropdownExpand: () -> Unit? = null)(source)

Displays the currently selected country (flag + dial code) and opens a CountriesBottomSheet when tapped.

Parameters

modifier

Modifier applied to the surface.

selectedCountry

Country to display; falls back to US if null.

onSelectCountry

Triggered when the user picks a country.

countriesToShow

Whitelist of ISO codes shown in the sheet.

countriesExclude

Blacklist of ISO codes hidden from the sheet.

pinnedCountries

ISO codes pinned to the top "Suggested" section.

ccpColors

Color configuration.

ccpConfig

Behavior and UI configuration.