TomlLocalizations class

Store translations per languageCode from a TOML file used by TomlLocalizationsDelegate.

Constructors

TomlLocalizations(String assetPath, [dynamic assetBundle])
Initialize with asset path to TOML files and a list of supported language codes.

Properties

assetBundle AssetBundle
The asset bundle.
final
assetPath String
Path to translation assets.
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<TomlLocalizations>
Load and cache a TOML file per language / country code.
loadAsset(dynamic path) Future<String?>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
value(String key) → dynamic
Get translation given a key.

Operators

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

Static Methods

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