DefaultConfig class

The default configuration that will be used to translate the keys if no configuration is provided

Inheritance

Constructors

DefaultConfig.new({String? absentValue, RegExp? paramPattern, Set<String>? supportedLanguages, String? defaultLanguage, Map<String, Map<String, String>>? translations, TranslationsStructureEnum? translationsStructure, String? absentKey})

Properties

absentKey String
The message that will be returned if a translation key is not found. This helps identify missing translations during development.
finalinherited
absentValue String
The value that will be returned if a parameter is not found in the translation. Default is '??' in DefaultConfig.
finalinherited
defaultLanguage String
The fallback language code used when a requested language is not supported. Must be one of the codes in supportedLanguages.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
paramPattern RegExp
The pattern used to identify dynamic parameters in translation strings. Default pattern in DefaultConfig is {paramName}.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
supportedLanguages Set<String>
Set of language codes that your application supports. Language codes should follow ISO 639-1 format (e.g., 'en', 'es', 'fr').
finalinherited
supportedLocales List<Locale>
Get all supported locales for MaterialApp configuration
no setterinherited
translations Map<String, Map<String, String>>
The translation data structure. Format depends on translationsStructure.
finalinherited
translationsStructure TranslationsStructureEnum
Determines how the translations map is structured. See TranslationsStructureEnum for details.
finalinherited

Methods

copyWith({String? absentValue, RegExp? paramPattern, Set<String>? supportedLanguages, String? defaultLanguage, Map<String, Map<String, String>>? translations, TranslationsStructureEnum? translationsStructure, String? absentKey}) TranslationsConfig
Creates a copy of this configuration with the specified fields replaced. Implement this method in your concrete configuration class.
override
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