onLogout method

FutureOr<void> onLogout(
  1. dynamic reason
)
override

@detail callback @author hanchenchen.c @brief Callback of logout result @param reason It describes the reason why users log out. See LogoutReason{@link #LogoutReason} @note You will receive this callback when calling logout{@link #RTCEngine#logout} or when the local user is kicked out because another user logs in with the same UserId.

Implementation

FutureOr<void> onLogout(dynamic reason) async {
  if ($instance == null || $instance is! IRTCEngineEventHandler) {
    return;
  }
  return ($instance as IRTCEngineEventHandler).onLogout?.call(
      t_LogoutReason.android_to_code($p_a.LogoutReason.values
          .firstWhere((t) => t.$value == reason || t.name == reason)));
}