AutoLocalized class

AutoLocalized generator config annotation class

Constructors

AutoLocalized({required List<AutoLocalizedLocale> locales, bool convertToCamelCase = true, OnBlankValueStrategy onBlankValueStrategy = OnBlankValueStrategy.error, bool generateGetterMethods = false, bool generateOfKeyFactories = false})
const

Properties

convertToCamelCase bool
If set to true then any key case will be converted to camel case in generated source. For example json key:
final
generateGetterMethods bool
When set to true apart from fields creates additional getter methods for generated fields and extension methods on BuildContext. This gives you the additional ways of getting strings.
final
generateOfKeyFactories bool
When set to true you will gain access to additional methods ofKey and maybeOfKey. They will allow you to get LocalizedString at runtime with key from translation file, for example:
final
hashCode int
The hash code for this object.
no setterinherited
locales List<AutoLocalizedLocale>
List of AutoLocalizedLocale, which is the main part of the config. List can't be empty.
final
onBlankValueStrategy OnBlankValueStrategy
Defines the behaviour when the value for key is blank or consists of the characters of whites only. Blank value will occur in any of the following cases:
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