toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() {
  final map = <String, dynamic>{
    'type': typeName,
    'rect': rect.toList(),
    'xref': xref,
  };
  if (content != null) map['content'] = content;
  if (title != null) map['title'] = title;
  if (color != null) map['color'] = color;
  if (opacity != null) map['opacity'] = opacity;
  return map;
}