Country Picker Config
Everything about what a picker offers and how selection behaves, in one value.
Appearance is not here: flags, list style, region filters, the A–Z rail and every other visual choice live in com.ezzy.ccp.countrypicker.theme.CountryPickerStyle. Keeping the two apart means a single config can be shared by every market selector in an app while each screen styles it as it needs:
val marketPicker = CountryPickerDefaults.config(allowedCountryCodes = supportedMarkets)Instances are Immutable, so passing one to a composable does not defeat skipping.
Constructors
Properties
When non-null, the only ISO alpha-2 codes offered. An empty set is meaningful: it allows nothing, and the sheet shows its "no countries available" state rather than silently falling back to everything.
Confirm automatically once maximumSelectionCount is reached. Reasonable for max = 1; surprising above that, so it defaults to off.
Dismiss the sheet after a single selection. Disable for a picker the user is expected to browse.
Custom ordering of the full list, or null for alphabetical by display name.
Codes shown but not selectable, marked "Not available". Prefer this over exclusion when the user needs to understand why their country cannot be chosen.
Regions offered as filters. Narrow it for a regional product.
Codes removed from the list. Applied after allowedCountryCodes, so exclusion always wins.
Region pre-selected when the sheet opens, or null for "All".
True when this config drives a multiple-selection picker.
Multiple-selection ceiling, or null for unlimited. Further taps are refused with feedback rather than silently ignored.
Characters before search filters. 1 — local search is instant, so there is no reason to make the user type more.
Multiple-selection floor. Confirm stays disabled below it.
How many recents to surface.
Which fields search matches against.
Single or multiple selection. Multiple selection adds the confirmation bar.
Surface recent selections. Requires a com.ezzy.ccp.countrypicker.persistence.RecentCountryStore; with the default no-op store there are none to show.
Offer search.
Surface suggestedCountryCodes.
Codes to suggest. Deliberately empty by default: which countries deserve promotion is a product decision, and a library that ships ["US","GB"] as a universal default is asserting something false about most apps.