toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() => {
  'name': name,
  'fontFamily': style.fontFamily,
  'fontSize': style.fontSize,
  'fontWeight': style.fontWeight,
  if (style.italic) 'italic': true,
  if (style.lineHeight != null) 'lineHeight': style.lineHeight,
  if (style.letterSpacing != 0) 'letterSpacing': style.letterSpacing,
};