flutter_localized_countries 1.0.0 copy "flutter_localized_countries: ^1.0.0" to clipboard
flutter_localized_countries: ^1.0.0 copied to clipboard

Country code to name mappings for several languages

flutter_localized_countries #

Country code to name mappings for 122 languages.

This is a port of an npm package localized-countries for Flutter.

Data is taken from https://github.com/umpirsky/country-list.

This package bundles required assets and provides custom LocalizationsDelegate for loading them.

Usage #

import 'package:flutter_localized_countries/flutter_localized_countries.dart';

void main() {
  runApp(MaterialApp(
    localizationsDelegates: [
      CountryNamesLocalizationsDelegate(),
      // ... more localization delegates
      GlobalMaterialLocalizations.delegate,
      GlobalWidgetsLocalizations.delegate,
    ],
    ...
  );
  
  ...
  
  print(CountryNames.of(context).nameOf('NL'));
}

Known Bugs #

4
likes
20
pub points
13%
popularity

Publisher

unverified uploader

Country code to name mappings for several languages

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter, flutter_localizations, intl

More

Packages that depend on flutter_localized_countries