copyWith method
Creates a copy of this instance, replacing the specified fields.
Implementation
ErrModel copyWith({
String? type,
String? error,
int? statusCode,
List<String>? stackTrace,
}) {
return ErrModel(
type: type ?? this.type,
error: error ?? this.error,
statusCode: statusCode ?? this.statusCode,
stackTrace: stackTrace ?? this.stackTrace,
);
}