toJson method

Map<String, dynamic> toJson()

Returns a representation of this object as a JSON object.

Implementation

Map<String, dynamic> toJson() {
  return <String, dynamic>{
    'fontFamily': fontFamily,
    'fontSize': fontSize,
    'fontWeightIndex': fontWeight?.index,
    'textAlignIndex': textAlign.index,
    'textDirectionIndex': textDirection.index,
    'letterSpacing': letterSpacing,
    'wordSpacing': wordSpacing,
    'lineHeight': lineHeight,
  };
}