DataStorage class

Represents a persistent storage in the browser.

It uses the available storage for implementation.

Constructors

DataStorage(String id, [DataStorageType storageType = DataStorageType.session])

Properties

hashCode int
The hash code for this object.
no setterinherited
id String
ID of this storage.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storageType DataStorageType
Type of this storage.
final

Methods

containsState(String name) bool
Returns true if this storage contains a State with name.
createState(String stateName) State
Creates a State with stateName.
getState(String name) State?
Gets a stored State with name.
getStates() List<State>
Returns a List<State> stored in this storage.
getStatesNames() List<String>
Returns a List<String> of stored State names.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerState(State state) bool
Registers a state.
toString() String
A string representation of this object.
inherited
unregisterState(String name) State?
Unregister a State by name.

Operators

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

Static Methods

isValidKeyName(String key) bool