KeyValueStorage$Impl class
Properties
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clear()
→ void
-
Removes all entries from the storage.
override
-
contains(String key)
→ bool
-
Checks whether the key exists in the storage.
key Key to check.
Returns true if a value is stored under the key (regardless of type).
override
-
getBool(String key, bool defaultValue)
→ bool
-
Gets a boolean value.
Returns defaultValue if the key is missing or the stored type is not bool.
key Lookup key.
defaultValue Value to return when not found or type mismatch.
Returns Stored bool or defaultValue.
override
-
getDouble(String key, double defaultValue)
→ double
-
Gets a 64-bit floating-point value.
Returns defaultValue if the key is missing or the stored type is not double.
key Lookup key.
defaultValue Value to return when not found or type mismatch.
Returns Stored double or defaultValue.
override
-
getFloat(String key, double defaultValue)
→ double
-
Gets a 32-bit floating-point value.
Returns defaultValue if the key is missing or the stored type is not float.
key Lookup key.
defaultValue Value to return when not found or type mismatch.
Returns Stored float or defaultValue.
override
-
getInt(String key, int defaultValue)
→ int
-
Gets a 32-bit integer value.
Returns defaultValue if the key is missing or the stored type is not int.
key Lookup key.
defaultValue Value to return when not found or type mismatch.
Returns Stored int32 or defaultValue.
override
-
getKeys()
→ List<String>
-
Returns all keys currently stored.
Returns List of keys. Order is implementation-defined (not guaranteed).
override
-
getLong(String key, int defaultValue)
→ int
-
Gets a 64-bit integer value.
Returns defaultValue if the key is missing or the stored type is not long.
key Lookup key.
defaultValue Value to return when not found or type mismatch.
Returns Stored int64 or defaultValue.
override
-
getString(String key, String defaultValue)
→ String
-
Gets a string value.
Returns defaultValue if the key is missing or the stored type is not string.
key Lookup key.
defaultValue Value to return when not found or type mismatch.
Returns Stored string or defaultValue.
override
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
putBool(String key, bool value)
→ void
-
Stores a boolean value under the key, replacing any existing value.
key Key to set.
value Value to store.
override
-
putDouble(String key, double value)
→ void
-
Stores a 64-bit floating-point value under the key, replacing any existing value.
key Key to set.
value Value to store.
override
-
putFloat(String key, double value)
→ void
-
Stores a 32-bit floating-point value under the key, replacing any existing value.
key Key to set.
value Value to store.
override
-
putInt(String key, int value)
→ void
-
Stores a 32-bit integer value under the key, replacing any existing value.
key Key to set.
value Value to store.
override
-
putLong(String key, int value)
→ void
-
Stores a 64-bit integer value under the key, replacing any existing value.
key Key to set.
value Value to store.
override
-
putString(String key, String value)
→ void
-
Stores a string value under the key, replacing any existing value.
key Key to set.
value Value to store.
override
-
remove(String key)
→ void
-
Removes a value by key. No-op if the key does not exist.
key Key to remove.
override
-
toString()
→ String
-
A string representation of this object.
inherited