country_geocode_picker 0.0.3
country_geocode_picker: ^0.0.3 copied to clipboard
A searchable country picker and phone number field for Flutter, with flags, dial codes, and a bundled 200+ country dataset. No network calls required.
country_geocode_picker #
A simple, drop-in country picker for Flutter. Add a searchable country dropdown or a phone number field with a dial-code prefix — no setup, no API keys, no network calls. Just add the widget and go.
Comes with 200+ countries baked right into the package: names, local names, ISO codes, dial codes, flags, and geocode language info.
Why you'll like it #
- Just works out of the box — drop in
CountryDropdownorCountryCodePhoneFieldand you're done. - Search built in — type a name, local name, ISO code, or dial code.
- Fully yours to restyle — swap the field, the list rows, or the whole picker UI whenever you want more control.
- Pin, restrict, or hide countries — show favorites first, limit to a region, or exclude ones you don't need.
- No internet required — the whole dataset ships inside the package.
Country picker #
Type to search, tap to pick. Favorites you set show up first.
CountryDropdown(
favoriteCountryCodes: const ['NP', 'IN', 'US'],
onChanged: (country) => print(country.dialCode),
)

Phone number field #
A normal text field for the number, with a tappable flag + dial code in front. Tapping it opens the same picker as above.
CountryCodePhoneField(
decoration: const InputDecoration(
border: OutlineInputBorder(),
hintText: 'Phone number',
),
onChanged: (value) => print(value.e164), // e.g. +9779812345678
)

More things you can do #
Pin, restrict, or exclude countries
CountryDropdown(
favoriteCountryCodes: const ['NP', 'IN'],
excludeCountryCodes: const ['KP'],
)
Make your own closed-state widget (chip, button, whatever you like)
CountryDropdown(
builder: (context, selected, openPicker) => GestureDetector(
onTap: openPicker,
child: Chip(label: Text(selected?.name ?? 'Pick a country')),
),
)
Just want the raw list of countries?
final countries = await CountryRepository.loadAll();
What a Country looks like #
class Country {
final int id;
final String name; // "Nepal"
final String localName; // "नेपाली"
final String dialCode; // "+977"
final String countryCode; // "NP" (ISO 3166-1 alpha-2)
final String flag; // "🇳🇵"
final List<GeocodeLanguage> geocodeLanguages;
}
Check out the example app for a full working demo.