copyWith method
Builds a copy of a ResponseError
code
: The error codemessage
: The error messagecontext
: The context of execution when the error ocurredtarget
: The target entity of the API that triggered this error
Implementation
ResponseError copyWith(
{ErrorCode? code, String? message, String? context, String? target}) {
return ResponseError(
code: code ?? this.code,
message: message ?? this.message,
context: context ?? this.context,
target: target ?? this.target);
}