Skip to content
pubscout

world_countries

4.7.0, released 5 weeks ago by tsin.is

Compile-time sealed world data with country, currency, language, and phone pickers.

WASM-readyUses material_ui
$ flutter pub add world_countries
Source repository

What it does

Provides compile-time constant, tree-shakable classes containing ISO world data (countries, currencies, languages, phone codes) and ready-to-use Material widgets and customizable pickers for them. It supports automatic localization via a locale delegate.

AI-written summary of version 4.7.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need country, currency, language, or phone code pickers in your app.
  • You want compile-time constant, tree-shakable world data without external API calls.

Skip it when

  • You only need a simple color picker or date picker.
  • You do not need ISO country or currency data structures.

Strengths

  • Tree-shakable and compile-time constant data structures.
  • Includes customizable pickers and theme extensions out of the box.
  • Built-in automatic translation delegate supporting many locales.

Weaknesses

  • Focused exclusively on world data and related pickers, not a general-purpose form builder.
  • Adds static dataset overhead if only a tiny fraction of countries are needed (though tree-shakable).

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
3

Add the dependency to pubspec.yaml and optionally register the TypedLocaleDelegate in your MaterialApp for localization.

MaterialApp(
  localizationsDelegates: const [
    ...GlobalMaterialLocalizations.delegates,
    TypedLocaleDelegate(),
  ],
  home: Scaffold(
    body: Center(
      child: CountryPicker(
        onSelect: (country) => debugPrint('$country'),
      ),
    ),
  ),
)

Alternatives

Packages that do the same job and could replace world_countries.

Works with

Packages commonly used together with world_countries: ones it builds on, ones built on it, and its own family.