toJson method Null safety
override
Holds the override implementation of the widget to get json format of the widget class
Implementation
@override
Map<String, dynamic> toJson() {
return {
...ColorProps(color: color).toJson(),
...TypographyProps(
fontFamily: fontFamily,
fontSize: fontSize,
fontStyle: fontStyle,
fontWeight: fontWeight,
letterSpacing: letterSpacing,
lineHeight: lineHeight,
textAlign: textAlign,
textDecoration: textDecoration,
textTransform: textTransform,
).toJson(),
'text': text,
};
}