country_meta 0.0.1 copy "country_meta: ^0.0.1" to clipboard
country_meta: ^0.0.1 copied to clipboard

A Dart-only package that provides structured metadata for all countries, including ISO codes, phone codes, currencies, localized names, and flag image URLs.

example/main.dart

import 'package:country_meta/country_meta.dart';

void main() {
  final country = CountryRepository.byAlpha2('US');

  if (country != null) {
    print('Name:     ${country.localizedName('en_US')}');
    print('Currency: ${country.currency} (${country.currencySymbol})');
    print('Phone:    ${country.phoneCode}');

    print('Flag (SVG):   ${country.flagUrl()}');
    print(
        'Flag (JPEG):  ${country.flagUrl(format: FlagImageFormat.jpeg, height: FlagHeight.h160)}');
    print(
        'Flag (WebP):  ${country.flagUrl(format: FlagImageFormat.webp, width: FlagWidth.w320)}');
  } else {
    print('Country not found.');
  }
}
8
likes
160
points
17
downloads

Publisher

unverified uploader

Weekly Downloads

A Dart-only package that provides structured metadata for all countries, including ISO codes, phone codes, currencies, localized names, and flag image URLs.

Homepage
Repository (GitHub)
View/report issues

Topics

#iso-codes #localization #flags #country #phone-codes

Documentation

API reference

License

MIT (license)

More

Packages that depend on country_meta