Flummkv class
Wraps MMKV on iOS) and Android, providing a persistent store for simple data.
Properties
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
allKeys(
{String id, String crypt}) → Future< List< String> > - Get all keys.
-
clear(
{String id, String crypt}) → Future< bool> - Completes with true once the user preferences for the app has been cleared.
-
contains(
String key, {String id, String crypt}) → Future< bool> -
True
if thekey
contains. -
count(
{String id, String crypt}) → Future< int> - Get item count.
-
decode<
T> (String key, {String id, String crypt, T defaultValue, Object reviver(Object key, Object value)}) → Future< T> -
encode(
String key, dynamic value, {String id, String crypt, Object toEncodable(Object nonEncodable)}) → Future< bool> -
get<
T> (String key, {String id, String crypt, T defaultValue}) → Future< T> -
getBool(
String key, {String id, String crypt, bool defaultValue}) → Future< bool> - Reads a value from persistent storage, throwing an exception if it's not a bool.
-
getDouble(
String key, {String id, String crypt, double defaultValue}) → Future< double> - Reads a value from persistent storage, throwing an exception if it's not a double.
-
getInt(
String key, {String id, String crypt, int defaultValue}) → Future< int> - Reads a value from persistent storage, throwing an exception if it's not an int.
-
getString(
String key, {String id, String crypt, String defaultValue}) → Future< String> - Reads a value from persistent storage, throwing an exception if it's not a string.
-
getUint8List(
String key, {String id, String crypt, Uint8List defaultValue}) → Future< Uint8List> -
Reads a value from persistent storage, throwing an exception if it's not a
Uint8List
. -
getValueSize(
String key, {String id, String crypt}) → Future< int> - Android only.
-
pageSize(
) → Future< int> - Android only.
-
removeByKey(
String key, {String id, String crypt}) → Future< bool> - Removes an entry from persistent storage.
-
set(
String key, dynamic value, {String id, String crypt}) → Future< bool> -
setBool(
String key, bool value, {String id, String crypt}) → Future< bool> -
Saves a boolean
value
to persistent storage in the background. -
setDouble(
String key, double value, {String id, String crypt}) → Future< bool> -
Saves a double
value
to persistent storage in the background. -
setInt(
String key, int value, {String id, String crypt}) → Future< bool> -
Saves an integer
value
to persistent storage in the background. -
setString(
String key, String value, {String id, String crypt}) → Future< bool> -
Saves a string
value
to persistent storage in the background. -
setUint8List(
String key, Uint8List value, {String id, String crypt}) → Future< bool> -
Saves a
Uint8List
value
to persistent storage in the background. -
totalSize(
{String id, String crypt}) → Future< int> - Get storage file size.