BasePreferences class

Preferences 配置信息存储

Constructors

BasePreferences()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
keys Set<String>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sharedPreferences SharedPreferences?
no setter

Methods

clear() Future<bool>
clear
get(String key) Object?
get dynamic
getBool(String key) bool?
get bool
getDecodeList(String key) List?
get list and decode 常用于 list 嵌套 map
getDouble(String key) double?
getInt(String key) int?
getMap(String key) Map?
get map
getString(String key) String?
get string
getStringList(String key) List<String>?
get string list
init() Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
put(String key, String value) Future<bool>
putAll(Map<String, String> entries) Future<bool>
reload() bool
remove(String key) Future<bool>
remove
setBool(String key, bool value) Future<bool>
set bool
setDouble(String key, double value) Future<bool>
set double
setEncodeList(String key, List value) Future<bool>
set list and encode 常用于 list 嵌套 map
setInt(String key, int value) Future<bool>
set int
setMap(String key, Map value) Future<bool>
set map
setString(String key, String value) Future<bool>
set string
setStringList(String key, List<String> value) Future<bool>
set string list
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance BasePreferences
no setter