toJson method

Map<String, dynamic> toJson()

Converts these properties to a JSON map, omitting null values.

Implementation

Map<String, dynamic> toJson() => {
      if (annotationId != null) 'annotationId': annotationId,
      if (pageIndex != null) 'pageIndex': pageIndex,
      if (strokeColor != null) 'strokeColor': strokeColor,
      if (fillColor != null) 'fillColor': fillColor,
      if (opacity != null) 'opacity': opacity,
      if (lineWidth != null) 'lineWidth': lineWidth,
      if (flagsJson != null) 'flagsJson': flagsJson,
      if (customDataJson != null) 'customDataJson': customDataJson,
      if (contents != null) 'contents': contents,
      if (subject != null) 'subject': subject,
      if (creator != null) 'creator': creator,
      if (bboxJson != null) 'bboxJson': bboxJson,
      if (note != null) 'note': note,
      if (inkLinesJson != null) 'inkLinesJson': inkLinesJson,
      if (fontName != null) 'fontName': fontName,
      if (fontSize != null) 'fontSize': fontSize,
      if (iconName != null) 'iconName': iconName,
    };