copyWith method
dynamic
copyWith({
- int? statusCode,
- String? message,
- dynamic data,
- int? affectedRows,
- dynamic extra,
- List<
ValidationErrorModel> ? required,
Creates a copy of the ResponseModel with the specified values.
This method can be used to create a new instance of ResponseModel that has the same values as the current instance, but with some values replaced by the values specified in the parameters.
Implementation
copyWith({
int? statusCode,
String? message,
dynamic data,
int? affectedRows,
dynamic extra,
List<ValidationErrorModel>? required,
}) {
return ResponseModel(
statusCode: statusCode ?? this.statusCode,
message: message ?? this.message,
data: data ?? this.data,
affectedRows: affectedRows ?? this.affectedRows,
extra: extra ?? this.extra,
required: required ?? this.required,
);
}