AliAuthPluginWebApi class
上游号码认证 Web 包装器;持有一个 JS SDK 对象,保留原始 JS 回调数据。
import 'package:ali_auth_spm/ali_auth_web_api.dart';
final api = AliAuthPluginWebApi();
final version = await api.getVersion();
final connection = await api.getConnection();
SDK 脚本由宿主加载;没有注入构造器、自动日志或 Dart Map 转换。对象由 JS 生命周期 管理,此包装器不注册长期监听或提供额外 dispose,凭据仅用于提交 SDK 调用。
Constructors
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
-
checkAuthAvailable(
String accessToken, String jwtToken, void success(JSAny? status), void error(JSAny? status)) → Future< void> -
提交
accessToken和jwtToken给 SDK,不记录或持久化凭据。 -
getConnection(
) → Future< String?> - 等待 SDK 网络状态 Promise 并返回可空字符串;拒绝和互操作异常向上传播。
-
getVerifyToken(
void success(JSAny? status), void error(JSAny? status)) → Future< void> -
已鉴权后提交取号请求;
success和error接收 SDK 原始 JS 结果。 -
getVersion(
) → Future< String?> - 等待 SDK 版本 Promise,返回可空字符串;异常不吞掉,不改变原始结果。
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setLoggerEnable(
bool isEnable) → Future< void> -
将
isEnable传入 SDK 日志开关;Future 完成表示调用已提交,异常向上传播。 -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited