onLoginResult method

FutureOr<void> onLoginResult(
  1. dynamic uid,
  2. dynamic errorCode,
  3. dynamic elapsed
)
override

@detail callback @author hanchenchen.c @brief Login result callback @param uid
Login user ID @param errorCode
Login result
See LoginErrorCode{@link #LoginErrorCode}. @param elapsed
The length of time it takes from calling the login{@link #RTCEngine#login} interface to return the result.
Is in ms. @note This callback is received after login{@link #RTCEngine#login} is called

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);
}