AssetBundleLocalizationDataSource class

A LocalizationDataSource that retrieves assets from an AssetBundle.

Implemented types

Constructors

AssetBundleLocalizationDataSource({String bundlePath = 'localizations', AssetBundle? bundle, bool cache = true})

Properties

bundle AssetBundle
The AssetBundle where it retrieves the assets from.
final
bundlePath String
The path prefixed to the asset when retrieving from the bundle.
final
cache bool
final
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

load(Locale locale, {String manifest = 'AssetManifest.json'}) Future<Map<String, dynamic>>
Loads all '.json' localization files declared in manifest with bundlePath given a locale. The assets themselves must have been previously declared in pubspec.yaml.
override
loadFromFiles(Iterable<String> files) Future<Map<String, dynamic>>
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.
override