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