copyWith method

WhiteboardShape copyWith({
  1. WhiteboardShapeType? type,
  2. List<Offset>? points,
  3. Offset? start,
  4. Offset? end,
  5. String? text,
  6. Color? color,
  7. double? thickness,
  8. LineType? lineType,
  9. String? fontFamily,
  10. double? fontSize,
  11. Image? image,
  12. String? imageSrc,
})

Creates a copy of this shape with optional parameter overrides.

Implementation

WhiteboardShape copyWith({
  WhiteboardShapeType? type,
  List<Offset>? points,
  Offset? start,
  Offset? end,
  String? text,
  Color? color,
  double? thickness,
  LineType? lineType,
  String? fontFamily,
  double? fontSize,
  ui.Image? image,
  String? imageSrc,
}) {
  return WhiteboardShape(
    type: type ?? this.type,
    points: points ?? this.points,
    start: start ?? this.start,
    end: end ?? this.end,
    text: text ?? this.text,
    color: color ?? this.color,
    thickness: thickness ?? this.thickness,
    lineType: lineType ?? this.lineType,
    fontFamily: fontFamily ?? this.fontFamily,
    fontSize: fontSize ?? this.fontSize,
    image: image ?? this.image,
    imageSrc: imageSrc ?? this.imageSrc,
  );
}