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.
@param key Key to check.
@return 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.
@param key Lookup key.
@param defaultValue Value to return when not found or type mismatch.
@return 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.
@param key Lookup key.
@param defaultValue Value to return when not found or type mismatch.
@return 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.
@param key Lookup key.
@param defaultValue Value to return when not found or type mismatch.
@return 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.
@param key Lookup key.
@param defaultValue Value to return when not found or type mismatch.
@return Stored int32 or defaultValue.
override
-
getKeys()
→ List<String>
-
Returns all keys currently stored.
@return 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.
@param key Lookup key.
@param defaultValue Value to return when not found or type mismatch.
@return 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.
@param key Lookup key.
@param defaultValue Value to return when not found or type mismatch.
@return 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.
@param key Key to set.
@param 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.
@param key Key to set.
@param 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.
@param key Key to set.
@param value Value to store.
override
-
putInt(String key, int value)
→ void
-
Stores a 32-bit integer value under the key, replacing any existing value.
@param key Key to set.
@param value Value to store.
override
-
putLong(String key, int value)
→ void
-
Stores a 64-bit integer value under the key, replacing any existing value.
@param key Key to set.
@param value Value to store.
override
-
putString(String key, String value)
→ void
-
Stores a string value under the key, replacing any existing value.
@param key Key to set.
@param value Value to store.
override
-
remove(String key)
→ void
-
Removes a value by key. No-op if the key does not exist.
@param key Key to remove.
override
-
toString()
→ String
-
A string representation of this object.
inherited