toJson method

  1. @override
Map<String, dynamic> toJson()
override

Implementation

@override
Map<String, dynamic> toJson() {
  return {
    ...super.toJson(),
    'stampType': stampType.name,
    if (attachment != null) 'attachment': attachment,
    if (rotation != 0.0) 'rotation': rotation,
    if (title != null) 'title': title,
    if (color != null) 'color': Annotation._colorToHex(color!),
    if (subtitle != null) 'subtitle': subtitle,
  };
}