utils library

Classes

Country
A class representing country-related information, including codes, currencies, flags, languages, names, nationalities, and phone codes.
Language
A class representing a language, including its code, optional country code, numerical digits, and names in English and native scripts.
LocalizableString
A class to store and manage a set of localized strings for different languages.
MapReader
A utility class to safely read nested values from a Map using a separator.
TextReplacer
A utility class for performing conditional and mapped text replacements.
TextureIcons
A collection of commonly used text-based icons.

Extensions

LanguageHelper on Locale
Extension helper for Locale to easily get Language objects.
LocalizableStringHelper on LocalizableString?
Extension helpers for nullable LocalizableString objects.
MapReaderHelper on Map
Extension helper to read nested values directly on Map instances.
TextReplacerHelper on String
Extension for String to allow direct replacement calls.

Properties

kCountries Iterable<Country>
List of all countries initialized from English names.
final
kFilteredLocales List<Locale>
Filters kLocales to include only the first occurrence of each language code. This prevents duplicate language entries across different countries.
final
kLanguages Iterable<Language>
List of all languages initialized from English names.
final
kLocales Iterable<Locale>
List of all locales generated from country-language mapping. Each entry uses the language code from the mapping and the country code as the locale's country.
final

Functions

isRtlLocale(String languageCode) bool
Checks if a given language code is an RTL (Right-To-Left) language.