rtcEngine$onLoginResult$errorCode$elapsed method
FutureOr<void>
rtcEngine$onLoginResult$errorCode$elapsed(
- dynamic engine,
- dynamic uid,
- dynamic errorCode,
- dynamic elapsed,
override
@detail callback
@author hanchenchen.c
@brief 登录结果回调
@param engine ByteRTCEngine 对象
@param uid
登录用户 ID
@param errorCode
登录结果
详见 ByteRTCLoginErrorCode{@link #ByteRTCLoginErrorCode}。
@param elapsed
从调用 login:uid:{@link #ByteRTCEngine#login:uid} 接口开始到返回结果所用时长。
单位为 ms。
@note 调用 login:uid:{@link #ByteRTCEngine#login:uid} 后,会收到此回调。
Implementation
FutureOr<void> rtcEngine$onLoginResult$errorCode$elapsed(
dynamic engine, dynamic uid, dynamic errorCode, dynamic elapsed) async {
if ($instance == null || $instance is! IRTCEngineEventHandler) {
return;
}
return ($instance as IRTCEngineEventHandler).onLoginResult?.call(
uid.toString(),
t_LoginErrorCode.ios_to_code($p_i.ByteRTCLoginErrorCode.values
.firstWhere((t) => t.$value == errorCode || t.name == errorCode)),
int.tryParse(elapsed.toString()) ?? 0);
}