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

Convert Locale (language code, script code and country code) to the corresponding Emoji Flag

example/locale_emoji_flutter_example.dart

// ignore_for_file: avoid_print

import 'dart:ui';

import 'package:locale_emoji_flutter/locale_emoji_flutter.dart';

void main() {
  const Locale locale = Locale('en', 'GB');
  print(locale.flagEmoji); // 'πŸ‡¬πŸ‡§'

  print(const Locale('de').flagEmoji); // 'πŸ‡©πŸ‡ͺ'
  print(const Locale('de', 'DE').flagEmoji); // 'πŸ‡©πŸ‡ͺ'
  print(const Locale('de', 'CH').flagEmoji); // 'πŸ‡¨πŸ‡­'
  print(const Locale('en').flagEmoji); // 'πŸ‡ΊπŸ‡Έ'
  print(const Locale('en', 'US').flagEmoji); // 'πŸ‡ΊπŸ‡Έ'
  print(const Locale('pt').flagEmoji); // 'πŸ‡§πŸ‡·'
  print(const Locale('zh').flagEmoji); // 'πŸ‡¨πŸ‡³'
  print(const Locale('zh', 'TW').flagEmoji); // 'πŸ‡ΉπŸ‡Ό'
}
7
likes
160
points
190
downloads

Publisher

verified publishermichaeldark.dev

Weekly Downloads

Convert Locale (language code, script code and country code) to the corresponding Emoji Flag

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, locale_emoji

More

Packages that depend on locale_emoji_flutter