RepositoryMap<K, V> class

A repository containing game data separated by locale. Use this to store data that is locale-specific, such as names, descriptions, etc.

Inheritance
Implementers

Constructors

RepositoryMap([String? initialLocale])

Properties

currentLocale String
The current locale.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
keys Iterable<K>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
values Iterable<V>
no setter

Methods

add(K key, V item) → void
addAll(Map<K, V> items) → void
addAllForLocale(String locale, Map<K, V> items) → void
addForLocale(String locale, K key, V item) → void
changeLocale(String locale) → void
Change the current locale to a new locale. Getting data will now be for this locale.
inherited
create() Map<K, V>
Create a new item.
override
get() Map<K, V>
Get the item data for the current locale.
inherited
getForLocale(String locale) Map<K, V>
Get the item data for the given locale.
inherited
getItem(String key) → V
getItemFor(String locale, String key) → V
initLocale(String locale) → void
Initialize the repository for a new locale. If one already exists, it will not be overwritten.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set(Map<K, V> item) → void
Get the item data for the current locale.
inherited
setForLocale(String locale, Map<K, V> item) → void
Set the item data for the given locale.
inherited
toString() String
A string representation of this object.
inherited

Operators

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