YamlLocalizations class

Store translations per languageCode/country from a Yaml file used by YamlLocalizationsDelegate.

Constructors

YamlLocalizations(String assetPath, [dynamic assetBundle])
Initialize with asset path to yaml files and an optional assetBundle.

Properties

assetBundle AssetBundle
The asset bundle.
final
assetPath String
Path to YAML assets file.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

load(Locale locale) Future<YamlLocalizations>
Load and cache a yaml file per language / country code.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
string(String key) String
Get translated String given a key.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

of(BuildContext context) YamlLocalizations?
Helper for getting YamlLocalizations object.