onError method

FutureOr<void> onError(
  1. dynamic err
)
override

@detail callback @author panjian.fishing @brief Error callback occurred. @param err BigInt, see: ErrorCode{@link #ErrorCode} for detailed definitions @note Error callback occurred. This callback is triggered when a network or media-related error occurs during the
SDK runtime and cannot be automatically recovered and you may need to intervene.and you may need to intervene.

Implementation

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