Skip to content
pubscout

country_dial_code

1.3.0, released 11 months ago by alexastudillo.com

Provides country dialing codes and a picker widget with SVG flags.

WASM-ready
$ flutter pub add country_dial_code
Source repository

What it does

This package offers a list of 250 country dialing codes and names, and includes a customizable picker widget that displays flags and allows selection via a modal bottom sheet. It also supports searching and ranking of countries in the picker.

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

Use it when

  • You need to display or retrieve a country dialing code by ISO 3166 code.
  • You want a ready‑made country picker with flags for user input.
  • You need SVG flag images for high‑quality display.

Skip it when

  • You only need a simple map of codes and prefer a lightweight data‑only solution.
  • You are building a non‑Flutter project or a pure Dart backend.
  • You require advanced localization or internationalization beyond dialing codes.

Strengths

  • Comprehensive list of 250 countries’ codes.
  • Built‑in picker widget with customizable layout and callbacks.
  • SVG flag support for crisp rendering on all platforms.

Weaknesses

  • No unit tests documented.
  • Limited to Flutter; not usable in pure Dart projects.
  • No support for custom country data beyond the provided list.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1
final code = CountryDialCode.fromCountryCode('US');

Alternatives

Packages that do the same job and could replace country_dial_code.

  • country_code

    Provides ISO 3166-1 country codes in an enum-like class with parsing and user-assigned elements.

  • async_extension

    Dart async extensions for Future, FutureOr, and performance improvements.

  • package_signature

    Retrieve Android package signature (SHA1/SHA256) in a Flutter app.

  • d4rt

    An interpreter and runtime for executing Dart code dynamically.

Works with

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