CatalogState class

Constructors

CatalogState({required int version, required String sourceLocale, required String format, required Map<String, CatalogKeyState> keys, Map<String, String>? languageGroupFallbacks, Map<String, String>? customLocaleDirections})

Properties

customLocaleDirections → Map<String, String>
Maps custom locales to their text direction ("ltr" or "rtl"). Example: {"custom_dialect": "rtl", "fr_CA": "ltr"} Only needed for locales not in the predefined kAvailableLocales list.
final
format ↔ String
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
keys → Map<String, CatalogKeyState>
final
languageGroupFallbacks → Map<String, String>
Maps a regional locale to its language group fallback. Example: {"ar_SA": "ar_EG", "ar_AE": "ar_EG"} When ar_SA is missing a translation, it falls back to ar_EG.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sourceLocale ↔ String
getter/setter pair
version → int
final

Methods

copyWith({int? version, String? sourceLocale, String? format, Map<String, CatalogKeyState>? keys, Map<String, String>? languageGroupFallbacks, Map<String, String>? customLocaleDirections}) → CatalogState
Creates a copy of this CatalogState with the specified fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

empty({required String sourceLocale, required String format}) → CatalogState
fromJson(Map<String, dynamic> json) → CatalogState