copyWith method

ScanModel copyWith({
  1. HeaderModel? header,
  2. int? responseCode,
  3. String? responseMsg,
  4. String? rawResponse,
  5. List<ScanProductModel>? scannedProducts,
})

copy new instance of ScanModel.

Implementation

ScanModel copyWith({
  HeaderModel? header,
  int? responseCode,
  String? responseMsg,
  String? rawResponse,
  List<ScanProductModel>? scannedProducts,
}) {
  return ScanModel(
    header: header ?? this.header,
    responseCode: responseCode ?? this.responseCode,
    responseMsg: responseMsg ?? this.responseMsg,
    rawResponse: rawResponse ?? this.rawResponse,
    scannedProducts: scannedProducts ?? this.scannedProducts,
  );
}