copyWith method
UDocShape
copyWith(
{ - List<Offset>? points,
- Color? strokeColor,
- Color? fillColor,
- bool clearFill = false,
- double? strokeWidth,
- double? opacity,
- bool? dashed,
- String? text,
- double? fontSize,
- bool? bold,
- int? startMs,
- int? endMs,
- UDocShapeKind? kind,
})
Implementation
UDocShape copyWith({
List<Offset>? points,
Color? strokeColor,
Color? fillColor,
bool clearFill = false,
double? strokeWidth,
double? opacity,
bool? dashed,
String? text,
double? fontSize,
bool? bold,
int? startMs,
int? endMs,
UDocShapeKind? kind,
}) => UDocShape(
id: id,
kind: kind ?? this.kind,
points: points ?? this.points,
pageIndex: pageIndex,
blockIndex: blockIndex,
strokeColor: strokeColor ?? this.strokeColor,
fillColor: clearFill ? null : (fillColor ?? this.fillColor),
strokeWidth: strokeWidth ?? this.strokeWidth,
opacity: opacity ?? this.opacity,
dashed: dashed ?? this.dashed,
text: text ?? this.text,
fontSize: fontSize ?? this.fontSize,
bold: bold ?? this.bold,
startMs: startMs ?? this.startMs,
endMs: endMs ?? this.endMs,
createdAt: createdAt,
updatedAt: DateTime.now(),
);