SmartClientManager class
SmartDio 客户端管理器
管理多个命名的 Dio 实例,支持默认客户端机制。
Properties
- currentDefault → String
-
获取当前默认客户端 key
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
contains(
String key) → bool - 检查客户端是否存在
-
dispose(
String key) → void - 释放指定客户端
-
disposeAll(
) → void - 释放所有客户端
-
getConfig(
String key) → SmartConfig - 获取配置
-
getDio(
String key) → Dio - 获取 Dio 实例
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
register(
String key, SmartConfig config) → void - 注册客户端
-
setDefault(
String key) → void - 切换默认客户端
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → SmartClientManager
-
final
Constants
- defaultKey → const String
- 默认客户端 key