SimpleStringKeyValueServer class abstract
Helper class for simple key-value servers that only support string keys and string values
- Implemented types
Constructors
Properties
-
allValues
→ Future<
List< Tuple2< >ValueWithType, ValueWithType> > -
Gets (reloads if applicable) all values associated with this server
Implementations are allowed to set certain large values to 'null' to
allow lazy loading using get
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → String?
-
The icon to use for this server.
Must be an svg or a base64 encoded png (square, preferably 16x16 or 32x32)
final
- id → String
-
Unique id for this session
no setterinherited
-
keyIcons
→ Map<
ValueWithType, String> -
Provide an optional icon for the given key.
Should be a square icon provided as base64, either PNG: 16x16 or 32x32 or SVG.
final
-
keyOptions
→ Set<
ValueWithType> -
Restrict the keys to this list of keys. Useful as hints for the UI
These values are NOT used to enforce set restrictions
final
-
keySuggestions
→ Set<
ValueWithType> -
List of suggested key values to show in the UI. Useful as hints for the UI
These values are NOT used to enforce set restrictions
final
- name → String
-
The name of this server, eg: the name of the preference file
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
supportedKeyTypes
→ Set<
StorageType> -
All the different key types supported by the server
final
-
supportedValueTypes
→ Set<
StorageType> -
All the different value types supported by the server
final
-
typeForKey
→ Map<
ValueWithType, StorageType> -
Hint for which keys, which value types is required
final
-
values
→ Future<
Iterable< MapEntry< >String, String> > -
(Re-)Loads all values
no setter
Methods
-
clear(
) → Future< void> -
Clears all key-value pairs
override
-
clearValues(
) → Future< void> - Remove all values for this key
-
get(
ValueWithType key) → Future< ValueWithType> -
Gets the value for the given key
override
-
getValue(
String key) → Future< String> - Gets the value for this key
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
ValueWithType key) → Future< void> -
Removes the value for the given key
override
-
removeValue(
String key) → Future< void> - Removes the value for this key
-
set(
ValueWithType key, ValueWithType newValue) → Future< void> -
Sets the value for the given key
override
-
setValue(
String key, String value) → Future< void> - Sets the value for this key
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited