locale_emoji 1.0.0 locale_emoji: ^1.0.0 copied to clipboard
Convert Locale (language code, script code and country code) to the corresponding Emoji Flag
example/locale_emoji_example.dart
import 'package:locale_emoji/locale_emoji.dart' as le;
void main() {
print(le.getFlagEmoji(languageCode: 'de')); // 'π©πͺ'
print(le.getFlagEmoji(languageCode: 'de', countryCode: 'DE')); // 'π©πͺ'
print(le.getFlagEmoji(languageCode: 'de', countryCode: 'CH')); // 'π¨π'
print(le.getFlagEmoji(languageCode: 'en')); // 'πΊπΈ'
print(le.getFlagEmoji(languageCode: 'en', countryCode: 'US')); // 'πΊπΈ'
print(le.getFlagEmoji(languageCode: 'pt')); // 'π§π·'
print(le.getFlagEmoji(languageCode: 'zh')); // 'π¨π³'
print(le.getFlagEmoji(languageCode: 'zh', countryCode: 'TW')); // 'πΉπΌ'
}