MMKVStorage class
Constructors
- MMKVStorage()
-
factory
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
-
getBool(
{required String key}) → Future< bool?> -
获取bool值
key
存储keypart
缓存区类型 -
getDouble(
{required String key}) → Future< double?> -
获取double值
key
存储keypart
缓存区类型 -
getEntity<
T> ({required String key}) → Future< T?> -
获取存储对象
key
存储key -
getInt(
{required String key}) → Future< int?> -
获取int值
key
存储keypart
缓存区类型 -
getList<
T> ({required String key}) → Future< T?> -
获取存储列表
key
存储key -
getString(
{required String key}) → Future< String?> -
获取string值
key
存储keypart
缓存区类型 -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
put(
{required String key, dynamic data}) → void -
保存数据
key
存储keydata
dynamic data -
putBool(
{required String key, bool value = false}) → void -
保存bool数据
key
存储keyvalue
bool value -
putDouble(
{required String key, double value = 0.0}) → void -
保存double数据
key
存储keyvalue
double value -
putInt(
{required String key, int value = 0}) → void -
保存int数据
key
存储keyvalue
int value -
putString(
{required String key, String value = ""}) → void -
保存string数据
key
存储keyvalue
string value -
remove(
{required String key}) → void -
清除key对应缓存数据
key
存储key -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → MMKVStorage
-
no setter