StorageUtil class

本地化存储工具类

Constructors

StorageUtil()

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 Methods

get<T>(String key, {T? defaultValue, Parser<T>? parser}) → T?
获取数据 key 键 defaultValue 默认值 parser 自定义解析器
getLocalData() → Map<String, dynamic>
获取所有本地数据
getStringList(String key) → List<String>
获取List<String>类型数据
init() → Future
初始化
remove(String key) → Future<bool>
删除本地数据
save<T>(String key, T value, {Serializer<T>? serializer}) → Future
保存 基本类型数据 bool int double String List
secureRead(String key, String value) → Future<String?>
读取加密存储
secureSave(String key, String value) → Future<void>
加密存储

Constants

storage → const FlutterSecureStorage