locale_emoji 0.1.3 copy "locale_emoji: ^0.1.3" to clipboard
locale_emoji: ^0.1.3 copied to clipboard

outdated

Convert Locale (i.e. language code, script code and country code) to flag emoji

example/locale_emoji_example.dart

import 'package:locale_emoji/locale_emoji.dart' as le;

void main() {
  print('de outputs πŸ‡©πŸ‡ͺ: ${le.getFlagEmoji('de')}');
  print('en outputs πŸ‡ΊπŸ‡Έ: ${le.getFlagEmoji('en')}');
  print('EN outputs πŸ‡ΊπŸ‡Έ: ${le.getFlagEmoji('EN')}');
  print('pt outputs πŸ‡§πŸ‡·: ${le.getFlagEmoji('pt')}');
  print('zh outputs πŸ‡¨πŸ‡³: ${le.getFlagEmoji('zh')}');
  print('de-DE outputs πŸ‡©πŸ‡ͺ: ${le.getFlagEmoji('de', countryCode: 'DE')}');
  print('de-DE outputs πŸ‡©πŸ‡ͺ: ${le.getFlagEmoji('de', countryCode: 'DE')}');
  print('de-CH outputs πŸ‡¨πŸ‡­: ${le.getFlagEmoji('de', countryCode: 'CH')}');
  print('en-GB outputs πŸ‡¬πŸ‡§: ${le.getFlagEmoji('en', countryCode: 'GB')}');
  print('en-US outputs πŸ‡ΊπŸ‡Έ: ${le.getFlagEmoji('en', countryCode: 'US')}');
  print('EN-US outputs πŸ‡ΊπŸ‡Έ: ${le.getFlagEmoji('EN', countryCode: 'US')}');
  print('EN-us outputs πŸ‡ΊπŸ‡Έ: ${le.getFlagEmoji('EN', countryCode: 'us')}');
  print('en-us outputs πŸ‡ΊπŸ‡Έ: ${le.getFlagEmoji('en', countryCode: 'us')}');
  print('zh-TW outputs πŸ‡ΉπŸ‡Ό: ${le.getFlagEmoji('zh', countryCode: 'TW')}');
  print('zh-tw outputs πŸ‡ΉπŸ‡Ό: ${le.getFlagEmoji('zh', countryCode: 'tw')}');
  print('zh-Bopo outputs πŸ‡ΉπŸ‡Ό: ${le.getFlagEmoji('zh', scriptCode: 'Bopo')}');
  print('zh-Hanb outputs πŸ‡ΉπŸ‡Ό: ${le.getFlagEmoji('zh', scriptCode: 'Hanb')}');
  print('zh-Hant outputs πŸ‡ΉπŸ‡Ό: ${le.getFlagEmoji('zh', scriptCode: 'Hant')}');
  print('zh-BOPO outputs πŸ‡ΉπŸ‡Ό: ${le.getFlagEmoji('zh', scriptCode: 'BOPO')}');
  print('zh-HANB outputs πŸ‡ΉπŸ‡Ό: ${le.getFlagEmoji('zh', scriptCode: 'HANB')}');
  print('zh-HANT outputs πŸ‡ΉπŸ‡Ό: ${le.getFlagEmoji('zh', scriptCode: 'HANT')}');
  print('eo outputs null: ${le.getFlagEmoji('eo')}');
  print('rubbish outputs null: ${le.getFlagEmoji('rubbish')}');
  print(
    'sk-Latin-SK outputs πŸ‡ΈπŸ‡°: ${le.getFlagEmoji('sk', scriptCode: 'Latin', countryCode: 'SK')}',
  );
}
3
likes
0
points
246
downloads

Publisher

verified publishermichaeldark.dev

Weekly Downloads

Convert Locale (i.e. language code, script code and country code) to flag emoji

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on locale_emoji