TokenManager class

Token管理器 负责管理和获取Token

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

clearToken() → void
清除Token
getToken() String?
获取Token
hasToken() bool
检查是否有Token
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setToken(String token) → void
设置Token
setTokenGetter(String? tokenGetter()) → void
设置Token获取器 适用于需要动态获取Token的场景(例如从SharedPreferences或SecureStorage读取)
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance TokenManager
单例实例
final