YkParamsUtil 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

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 YkParamsUtil
final
isProduct bool
获取当前环境
no setter
params Map<String, dynamic>
获取所有参数
no setter

Static Methods

clear() → void
清除所有参数
config({required Map<String, dynamic> params, required bool isProduct}) → void
配置参数和环境
get<T>({String? key, Future<T> debugCallBack()?, Future<T> productCallBack()?}) Future<T?>
获取参数或执行回调 key - 参数键值 debugCallBack - 开发环境回调 productCallBack - 生产环境回调
removeParam(String key) → void
移除参数
updateParam(String key, dynamic value) → void
更新单个参数
updateParams(Map<String, dynamic> newParams) → void
批量更新参数