toJson method
Implementation
@override
Map<String, dynamic> toJson() {
return {
...super.toJson(),
'lines': lines.toJson(),
'lineWidth': lineWidth,
'isDrawnNaturally': isDrawnNaturally,
if (isSignature != null) 'isSignature': isSignature,
if (strokeColor != null)
'strokeColor': Annotation._colorToHex(strokeColor!),
if (backgroundColor != null)
'backgroundColor': Annotation._colorToHex(backgroundColor!),
if (blendMode != null) 'blendMode': blendMode!.name,
if (note != null) 'note': note,
};
}