onEffectError method

FutureOr<void> onEffectError(
  1. dynamic error,
  2. dynamic msg
)
override

@hidden internal use only @detail callback @brief Effect failed. @param error The error type of effect. Refer to EffectErrorType{@link #EffectErrorType} for details. @param msg Error message.

Implementation

FutureOr<void> onEffectError(dynamic error, dynamic msg) async {
  if ($instance == null || $instance is! IRTCEngineEventHandler) {
    return;
  }
  return ($instance as IRTCEngineEventHandler).onEffectError?.call(
      t_EffectErrorType.android_to_code($p_a.EffectErrorType.values
          .firstWhere((t) => t.$value == error || t.name == error)),
      msg.toString());
}