LocaleConfiguration class

Configuration for a single locale including its code, native name, and icon

This class represents all the information needed to display and use a locale in the application's language selector.

Example:

const hindi = LocaleConfiguration(
  locale: Locale('hi'),
  nativeName: 'हिन्दी',
  icon: '🇮🇳',
);

Constructors

LocaleConfiguration({required Locale locale, required String nativeName, required String icon})
const
LocaleConfiguration.fromCode(String code, {required String nativeName, required String icon})
Create from language code with explicit name and icon
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
icon → String
Icon/emoji representing the locale (e.g., "🇮🇳" for Hindi)
final
languageCode → String
Get the language code from the locale
no setter
locale → Locale
The Flutter locale
final
nativeName → String
Native name of the language (e.g., "हिन्दी" for Hindi)
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited