toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  Map<String, dynamic> rst = {};

  rst.updateNotNull("color", color?.toJson());
  rst.updateNotNull("backgroundColor", backgroundColor?.toJson());

  rst.updateNotNull("fontSize", fontSize?.toJson());
  rst.updateNotNull("fontFamily", fontFamily);
  rst.updateNotNull("fontWeight", fontWeight?.toJson());
  rst.updateNotNull("fontStyle", fontStyle?.toJson());

  rst.updateNotNull("height", height);
  rst.updateNotNull("letterSpacing", letterSpacing?.toJson());
  rst.updateNotNull("wordSpacing", wordSpacing?.toJson());

  rst.updateNotNull("decoration", decoration?.toJson());
  rst.updateNotNull("decorationColor", decorationColor?.toJson());
  rst.updateNotNull("decorationStyle", decorationStyle?.toJson());
  rst.updateNotNull("decorationThickness", decorationThickness);

  rst.updateNotNull("shadows", shadows?.map((e) => e.toJson()).toList());

  return rst;
}