intl_country_data 1.2.9 copy "intl_country_data: ^1.2.9" to clipboard
intl_country_data: ^1.2.9 copied to clipboard

Dart package containing country data including international dialing codes and telephone number lengths. Other data include ISO 3166 2 letter country codes, flag emojis and country name translations. [...]

example/example.dart

import 'package:intl_country_data/intl_country_data.dart';

void main() {
  // Load all countries
  final all = IntlCountryData.all();
  print('Loaded ${all.length} countries: ${all.map((e) => e.name).join(', ')}');

  // Load the UK
  final country = IntlCountryData.fromCountryCodeAlpha2('GB');
  print('Loaded ${country.name} ${country.flag}! '
      'Also known as: ${country.nameTranslations.values.join(', ')}');

  // Find matching countries for a given telephone number
  final matching = IntlCountryData.fromTelephoneNumber('+447777666555');
  print('Found ${matching.length} countries for this phone number: '
      '${matching.map((e) => e.name).join(',')}');
}
3
likes
150
points
808
downloads

Documentation

API reference

Publisher

verified publisherrocketware.co.uk

Weekly Downloads

Dart package containing country data including international dialing codes and telephone number lengths. Other data include ISO 3166 2 letter country codes, flag emojis and country name translations. This package can be used in Dart or Flutter environments.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

More

Packages that depend on intl_country_data