toJson method
Implementation
@override
Map<String, dynamic> toJson() {
return {
...super.toJson(),
if (strokeColor != null)
'strokeColor': Annotation._colorToHex(strokeColor),
if (strokeWidth != null) 'strokeWidth': strokeWidth,
if (fillColor != null) 'fillColor': Annotation._colorToHex(fillColor!),
if (borderStyle != null) 'borderStyle': borderStyle!.name,
if (borderDashArray != null) 'borderDashArray': borderDashArray,
if (cloudyBorderIntensity != null)
'cloudyBorderIntensity': cloudyBorderIntensity,
if (cloudyBorderInset != null) 'cloudyBorderInset': cloudyBorderInset,
if (measurementScale != null) 'measurementScale': measurementScale,
if (measurementPrecision != null)
'measurementPrecision': measurementPrecision,
if (measurementBBox != null) 'measurementBBox': measurementBBox,
};
}