copyWith method

DocumentPage copyWith({
  1. String? id,
  2. Uint8List? originalBytes,
  3. Uint8List? processedBytes,
  4. DocumentFilterMode? filterMode,
  5. DocumentCorners? corners,
  6. ScanQualityReport? qualityReport,
  7. DateTime? timestamp,
  8. int? width,
  9. int? height,
})

Creates a defensive copy of this page.

Implementation

DocumentPage copyWith({
  String? id,
  Uint8List? originalBytes,
  Uint8List? processedBytes,
  DocumentFilterMode? filterMode,
  DocumentCorners? corners,
  ScanQualityReport? qualityReport,
  DateTime? timestamp,
  int? width,
  int? height,
}) {
  return DocumentPage(
    id: id ?? this.id,
    originalBytes: originalBytes ?? this.originalBytes,
    processedBytes: processedBytes ?? this.processedBytes,
    filterMode: filterMode ?? this.filterMode,
    corners: corners ?? this.corners,
    qualityReport: qualityReport ?? this.qualityReport,
    timestamp: timestamp ?? this.timestamp,
    width: width ?? this.width,
    height: height ?? this.height,
  );
}