catalog library

Constants

defaultDataType → const DataType
Default data type when none is specified (per spec FR-002).

Functions

canonicalizeCatalogValue(dynamic value) String
catalogCellStatusFromString(String value) CatalogCellStatus
catalogCellStatusToString(CatalogCellStatus status) String
catalogFileFormatFromString(String value) CatalogFileFormat
catalogFileFormatToString(CatalogFileFormat format) String
catalogGetValueByPath(Map<String, dynamic> map, String keyPath) → dynamic
catalogHasPath(Map<String, dynamic> map, String keyPath) bool
catalogRemoveValueByPath(Map<String, dynamic> map, String keyPath) bool
catalogSetValueByPath(Map<String, dynamic> map, String keyPath, dynamic value) → void
dataTypeFromString(String? value) DataType
Parses a string to DataType; returns defaultDataType for null/empty/unknown.
dataTypeToString(DataType type) String
Serializes DataType for storage (e.g. in @dataTypes map).
flattenTranslationMap(Map<String, dynamic> map) Map<String, dynamic>
getLanguageCode(String locale) String
Helper function: extracts language code from a locale. E.g., 'en_US' -> 'en', 'ar_SA' -> 'ar'
hasCircularFallback(Map<String, String> fallbacks, String locale, String newFallback) bool
Helper function: detects if adding a fallback would create a circular reference. Returns true if adding fallback for locale -> newFallback would cause a cycle.
isCatalogValueEmpty(dynamic value) bool
isValidCatalogKeyPath(String value) bool
loadCatalogBootstrapConfig() Future<CatalogBootstrapConfig>
resolveFallbackChain(Map<String, String> fallbacks, String locale) List<String>
Helper function: resolves the full fallback chain for a locale. Returns list of locales in fallback order: primary, fallback1, fallback2, ...
sameLanguageGroup(String locale1, String locale2) bool
Helper function: checks if two locales share the same language group. Same language group if they have the same language code, or one is a language-only code.