Dictionary class

Available extensions

Constructors

Dictionary.fromMap(Map<String, dynamic> map, {required String locale, Map<String, DataType>? dataTypes})

Properties

hashCode int
The hash code for this object.
no setterinherited
locale String
Get the current locale
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dataTypeForKey(String key) DataType
Data type for key; default string when absent.
getPluralData(String key) Map<String, dynamic>?
Get plural form data for a key - used by generated Dictionary classes
getString(String key, {String? fallback}) String
Get a translation by key with fallback
getStringWithParams(String key, Map<String, dynamic> params, {String? fallback}) String
Get a translation with parameters
hasKey(String key) bool
Check if a key exists in translations
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolve(UserContext context, String key, {Map<String, dynamic>? params, UserContext? overrides}) String

Available on Dictionary, provided by the DictionaryResolution extension

Resolves key using this dictionary and context, with optional params (e.g. count) and overrides. Uses the canonical resolution path (plural→gender→variant→formality→key) shared with raw-key access.
toMap() Map<String, dynamic>
Convert dictionary back to map
toString() String
A string representation of this object.
inherited

Operators

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