Country List Index
A lookup from a country (or an initial letter) to its row index in the flat LazyColumn that CountryList emits.
The translation is the whole point. CountryList renders a list of CountrySections, each optionally preceded by a sticky header, into one flat lazy list — so the nth country is not at lazy index n, and anything that wants to scroll to a specific country has to account for every header and every preceding section. Doing that arithmetic at each call site is how off-by-one scroll bugs get written; doing it once, here, from the same sections the list was built from, is how they do not.
Build one with rememberCountryListIndex.
Properties
Functions
Convenience for lazyIndexOf by country.
The lazy-list index of the first country starting with letter, or null if there is none.
The lazy-list index of iso2Code's row, or null when that country is not in the list.