ResourceStore class

This store handles the access to a specific resource (e.g. String) or a bundle (e.g. namespaces) depending on the levels transversed.

The access is done by Locale, Namespace, and key in that order.

Constructors

ResourceStore({Map<Locale, Map<String, dynamic>>? data})

Properties

hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addNamespace(Locale locale, String namespace, Map<String, dynamic> data) → void
Registers the namespace to the store for the given locale.
getNamespace(Locale locale, String namespace) Map<String, dynamic>?
get all data from locale and namespace
isLocaleRegistered(Locale locale) bool
Whether locale is registered in this store.
isNamespaceRegistered(Locale locale, String namespace) bool
Whether locale and namespace are registered in this store.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeAll() Future<void>
Unregisters all locales from the store and from the cache.
removeLocale(Locale locale) Future<void>
Unregisters the locale from the store and from the cache.
removeNamespace(Locale locale, String namespace) → void
Removes namespace given locale from the store.
retrieve(Locale locale, String namespace, String key, I18NextOptions options) String?
Attempts to retrieve a value given Locale in options, namespace, and key.
toString() String
A string representation of this object.
inherited

Operators

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