CacheServiceCore class

Constructors

CacheServiceCore()
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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent 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 Properties

instance → CacheServiceCore
no setter

Static Methods

clear() → Future<void>
清空所有存储的值
getBool(String key, {bool defaultValue = false}) → bool
获取一个布尔值,如果不存在返回默认值
getInt(String key, {int defaultValue = 0}) → int?
获取一个整型值,如果不存在返回默认值
getKey(String key) → String
根据不同环境获取key
getList<T>(String key) → List<T>?
获取一个数组,如果不存在返回空数组
getMap(String key) → Map<String, dynamic>?
获取一个Map,如果不存在返回空Map
getString(String key, {String? defaultValue}) → String?
获取一个字符串值,如果不存在返回默认值
init(String prefix) → Future<void>
remove(String key) → Future<void>
删除指定键的值
setBool(String key, bool value) → Future<void>
存储一个布尔值
setInt(String key, int value) → Future<void>
存储一个整型值
setList<T>(String key, List<T> value) → Future<void>
存储一个数组
setMap(String key, Map<String, dynamic>? value) → Future<void>
存储一个Map
setString(String key, String value) → Future<void>
存储一个字符串值