rtcEngine$onLogout method

FutureOr<void> rtcEngine$onLogout(
  1. dynamic engine,
  2. dynamic reason
)
override

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

Implementation

FutureOr<void> rtcEngine$onLogout(dynamic engine, dynamic reason) async {
  if ($instance == null || $instance is! IRTCEngineEventHandler) {
    return;
  }
  return ($instance as IRTCEngineEventHandler).onLogout?.call(
      t_LogoutReason.ios_to_code($p_i.ByteRTCLogoutReason.values
          .firstWhere((t) => t.$value == reason || t.name == reason)));
}