DictUtils class

字典缓存工具类 提供字典数据的缓存和异步加载功能

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

clear(String groupCode) → void
清空指定字典缓存
clearCache() → void
清空缓存
findDictEntity(String groupCode, String? value, {bool useCache = true, String systemDic = "1"}) Future<DictEntity?>
查找字典实体 根据字典分组代码和值查找对应的字典实体
findNameByValue(String groupCode, String? value, {bool useCache = true, String systemDic = "1"}) Future<String?>
查找字典名称 根据字典分组代码和值查找对应的字典名称
getDictList(String groupCode, {bool useCache = true, String systemDic = "1", bool onlyEnable = true}) Future<List<DictEntity>?>
获取字典列表 如果使用缓存且缓存存在,则直接返回缓存数据 否则,将异步加载数据,并缓存结果
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 DictUtils
获取单例实例 使用懒加载方式初始化实例
no setter