Mmkv class

Constructors

Mmkv({String id, String crypt})
const

Properties

crypt String
cryptKey's length <= 16
final
hashCode int
The hash code for this object.
read-onlyinherited
id String
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

allKeys() Future<List<String>>
Get all keys.
clear() Future<bool>
contains(String key) Future<bool>
True if the key contains.
count() Future<int>
decode<T>(String key, {T defaultValue, Object reviver(Object key, Object value)}) Future<T>
encode(String key, dynamic value, {Object toEncodable(Object nonEncodable)}) Future<bool>
get<T>(String key, {T defaultValue}) Future<T>
getBool(String key, {bool defaultValue}) Future<bool>
Reads a value from persistent storage, throwing an exception if it's not a bool.
getDouble(String key, {double defaultValue}) Future<double>
Reads a value from persistent storage, throwing an exception if it's not a double.
getInt(String key, {int defaultValue}) Future<int>
Reads a value from persistent storage, throwing an exception if it's not an int.
getString(String key, {String defaultValue}) Future<String>
Reads a value from persistent storage, throwing an exception if it's not a string.
getUint8List(String key, {Uint8List defaultValue}) Future<Uint8List>
Reads a value from persistent storage, throwing an exception if it's not a Uint8List.
getValueSize(String key) Future<int>
Android only.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
removeByKey(String key) Future<bool>
Removes an entry from persistent storage.
set(String key, dynamic value) Future<bool>
setBool(String key, bool value) Future<bool>
Saves a boolean value to persistent storage in the background.
setDouble(String key, double value) Future<bool>
Saves a double value to persistent storage in the background.
setInt(String key, int value) Future<bool>
Saves an integer value to persistent storage in the background.
setString(String key, String value) Future<bool>
Saves a string value to persistent storage in the background.
setUint8List(String key, Uint8List value) Future<bool>
Saves a Uint8List value to persistent storage in the background.
toString() String
A string representation of this object.
inherited
totalSize() Future<int>

Operators

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