Multi Country Selector
fun MultiCountrySelector(selectedCountries: Set<Country>, onSelectionConfirmed: (Set<Country>) -> Unit, modifier: Modifier = Modifier, config: CountryPickerConfig = CountryPickerDefaults.multiSelectConfig(), variant: CountrySelectorVariant = CountrySelectorVariant.Elevated, enabled: Boolean = true, state: CountrySelectorState = CountrySelectorState.Default, label: UiText? = UiText.resource(Res.string.ccp_country_of_residence), placeholder: UiText? = UiText.resource(Res.string.ccp_select_country_placeholder), summaryText: UiText? = null, showChips: Boolean = true, supportingText: UiText? = null, errorText: UiText? = null, required: Boolean = false, sheetTitle: UiText = UiText.resource(Res.string.ccp_select_country), sheetSubtitle: UiText? = UiText.resource(Res.string.ccp_select_country_subtitle), recentCountryStore: RecentCountryStore = NoOpRecentCountryStore, repository: CountryRepository = CountryRepository.Default, style: CountryPickerStyle = CountryPickerTheme.style, flagContent: @Composable (Country) -> Unit? = null, listItemContent: @Composable (CountryListItemScope) -> Unit? = null)(source)
A field for choosing several countries.
With one country it reads like a CountrySelector. With more, the field shows their flags stacked like avatars beside a summary — "Kenya, Germany +3" — and, with showChips, each country as a removable chip underneath, so the selection can be trimmed without reopening the picker.
Selection is controlled: selectedCountries is the source of truth, and changes — from the picker's Confirm or from removing a chip — arrive through onSelectionConfirmed.
Parameters
show Chips
A chip per selected country under the field. A chip cannot be removed when that would take the selection below the config's minimum.
summary Text
Overrides the field's summary.