LanguageConditions constructor
Conditions of the language that you want to translate into.
You have to specify the param
that matches the parameter in the text
(which is specified by the @ or @{}).
conditions
is a Map of key and value that you want to apply for each
condition. There is a default
key to let you set the default return if
there is no matched condition.
Eg.
LanguageData data = {
LanguageCodes.en : {
'This is @number dollar' : LanguageConditions(
param: 'number',
conditions: {
'0' : 'This is zero dollar',
'1' : 'This is one dollar',
'default' : 'This is @number dollars',
}
),
}
};
Implementation
LanguageConditions({
required this.param,
required this.conditions,
});