Country Flag
A country's flag.
Two independent choices shape it. source decides the artwork — flagcdn.com images in one of three shapes, or the platform's emoji (see CountryFlagSource). style decides the frame — a tile, a circle, rounded corners, or nothing (see CountryFlagStyle).
Images arrive asynchronously; until then, and whenever one cannot be fetched, the emoji flag stands in, so a flag slot is never empty. Where the emoji is missing too — a font stripped of flags, a territory with no emoji — the ISO code is drawn in the same frame instead of a row of boxes.
A change of country cross-fades, so a selection reads as a swap rather than a flicker. The flag is decorative and hidden from accessibility: the surrounding component always names the country.
Parameters
The flag's height. CountryFlagStyle.Plain and CountryFlagStyle.Rounded reserve a 4:3 slot of this height; the original shapes may draw slightly past it, as true proportions do.
How the flag is framed. Defaults to the theme's CountryPickerLayout.flagStyle.
Where the artwork comes from. Defaults to the theme's CountryPickerLayout.flagSource.
Replaces the artwork entirely — for your own vectors or images. It is still framed by style.