copyWith method

UDocMarkup copyWith({
  1. UDocMarkupKind? kind,
  2. Color? color,
  3. String? note,
  4. List<Rect>? rects,
  5. int? start,
  6. int? end,
  7. String? text,
  8. Map<String, Object?>? extra,
  9. bool touch = true,
})

Implementation

UDocMarkup copyWith({UDocMarkupKind? kind, Color? color, String? note, List<Rect>? rects, int? start, int? end, String? text, Map<String, Object?>? extra, bool touch = true}) => UDocMarkup(
  id: id,
  groupId: groupId,
  kind: kind ?? this.kind,
  pageIndex: pageIndex,
  blockIndex: blockIndex,
  start: start ?? this.start,
  end: end ?? this.end,
  text: text ?? this.text,
  rects: rects ?? this.rects,
  color: color ?? this.color,
  note: note ?? this.note,
  createdAt: createdAt,
  updatedAt: touch ? DateTime.now() : updatedAt,
  extra: extra ?? this.extra,
);