copyWith method

PrinterResponseStatus copyWith(
  1. {bool? offline,
  2. bool? coverOpen,
  3. bool? cutterError,
  4. bool? receiptPaperEmpty,
  5. String? errorMessage,
  6. bool? isSuccess,
  7. bool? overTemp,
  8. String? infoMessage,
  9. String? modelName,
  10. String? firmwareVersion}
)

Creates a copy of PrinterResponseStatus but with given field replace with new values

Implementation

PrinterResponseStatus copyWith({
  bool? offline,
  bool? coverOpen,
  bool? cutterError,
  bool? receiptPaperEmpty,
  String? errorMessage,
  bool? isSuccess,
  bool? overTemp,
  String? infoMessage,
  String? modelName,
  String? firmwareVersion,
}) {
  return PrinterResponseStatus(
    offline: offline ?? this.offline,
    coverOpen: coverOpen ?? this.coverOpen,
    cutterError: cutterError ?? this.cutterError,
    receiptPaperEmpty: receiptPaperEmpty ?? this.receiptPaperEmpty,
    errorMessage: errorMessage ?? this.errorMessage,
    isSuccess: isSuccess ?? this.isSuccess,
    overTemp: overTemp ?? this.overTemp,
    infoMessage: infoMessage ?? this.infoMessage,
    modelName: modelName ?? this.modelName,
    firmwareVersion: firmwareVersion ?? this.firmwareVersion,
  );
}