copyWith method

ErrModel copyWith({
  1. String? type,
  2. String? error,
  3. int? statusCode,
  4. List<String>? stackTrace,
})

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,
  );
}