toJson method

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

Implementation

@override
Map<String, dynamic> toJson() {
  return {
    ...super.toJson(),
    'action': action.toJson(),
    if (note != null) 'note': note,
    if (borderStyle != null) 'borderStyle': borderStyle!.name,
    if (borderWidth != null) 'borderWidth': borderWidth,
    if (borderColor != null)
      'borderColor': Annotation._colorToHex(borderColor!),
  };
}