copyWithout method

ErrModel copyWithout({
  1. bool type = true,
  2. bool error = true,
  3. bool statusCode = true,
  4. bool stackTrace = true,
})

Creates a copy of this instance, removing the specified fields.

Implementation

ErrModel copyWithout({
  bool type = true,
  bool error = true,
  bool statusCode = true,
  bool stackTrace = true,
}) {
  return ErrModel(
    type: type ? this.type : null,
    error: error ? this.error : null,
    statusCode: statusCode ? this.statusCode : null,
    stackTrace: stackTrace ? this.stackTrace : null,
  );
}