toJson method

Map<String, dynamic> toJson()

Convert to JSON

Implementation

Map<String, dynamic> toJson() {
  return {
    'type': type,
    'data': data,
    'position': position,
    'size': size,
    'rotation': rotation,
    'scale': scale,
    'page': page,
    if (color != null) 'color': color,
    if (fontSize != null) 'fontSize': fontSize,
    if (fontFamily != null) 'fontFamily': fontFamily,
  };
}