toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      if (fontSize != null) 'fontSize': fontSize,
      if (color != null) 'color': color,
      if (fontWeight != null) 'fontWeight': fontWeight!.name,
      if (fontFamily != null) 'fontFamily': fontFamily,
      if (backgroundColor != null) 'backgroundColor': backgroundColor,
      if (decoration != null) 'decoration': decoration!.name,
      if (letterSpacing != null) 'letterSpacing': letterSpacing,
      if (wordSpacing != null) 'wordSpacing': wordSpacing,
      if (lineHeight != null) 'lineHeight': lineHeight,
    };