copyWith method

ResponseModel copyWith({
  1. HeaderModel? header,
  2. int? responseCode,
  3. String? responseMsg,
  4. String? rawResponse,
  5. String? scannedData,
})

copy new instance of ResponseModel.

Implementation

ResponseModel copyWith({
  HeaderModel? header,
  int? responseCode,
  String? responseMsg,
  String? rawResponse,
  String? scannedData,
}) {
  return ResponseModel(
    header: header ?? this.header,
    responseCode: responseCode ?? this.responseCode,
    responseMsg: responseMsg ?? this.responseMsg,
    rawResponse: rawResponse ?? this.rawResponse,
    scannedData: scannedData ?? this.scannedData,
  );
}