copyWith method
AnnotationProperties
copyWith({
- String? annotationId,
- int? pageIndex,
- int? strokeColor,
- int? fillColor,
- double? opacity,
- double? lineWidth,
- String? flagsJson,
- String? customDataJson,
- String? contents,
- String? subject,
- String? creator,
- String? bboxJson,
- String? note,
- String? inkLinesJson,
- String? fontName,
- double? fontSize,
- String? iconName,
Returns a copy with the given fields replaced.
Platform getAnnotationProperties implementations build the result from
the annotation's InstantJSON, which keys the identifier as name (not
annotationId) and so leaves annotationId null. They use this to stamp
the authoritative annotationId / pageIndex they were queried with back
onto the result, so callers (and a subsequent saveAnnotationProperties)
always have the id they looked the annotation up by.
Implementation
AnnotationProperties copyWith({
String? annotationId,
int? pageIndex,
int? strokeColor,
int? fillColor,
double? opacity,
double? lineWidth,
String? flagsJson,
String? customDataJson,
String? contents,
String? subject,
String? creator,
String? bboxJson,
String? note,
String? inkLinesJson,
String? fontName,
double? fontSize,
String? iconName,
}) =>
AnnotationProperties(
annotationId: annotationId ?? this.annotationId,
pageIndex: pageIndex ?? this.pageIndex,
strokeColor: strokeColor ?? this.strokeColor,
fillColor: fillColor ?? this.fillColor,
opacity: opacity ?? this.opacity,
lineWidth: lineWidth ?? this.lineWidth,
flagsJson: flagsJson ?? this.flagsJson,
customDataJson: customDataJson ?? this.customDataJson,
contents: contents ?? this.contents,
subject: subject ?? this.subject,
creator: creator ?? this.creator,
bboxJson: bboxJson ?? this.bboxJson,
note: note ?? this.note,
inkLinesJson: inkLinesJson ?? this.inkLinesJson,
fontName: fontName ?? this.fontName,
fontSize: fontSize ?? this.fontSize,
iconName: iconName ?? this.iconName,
);