toJson method
dynamic
toJson()
Implementation
dynamic toJson() {
return <String, dynamic>{
'inherit': inherit,
if (color != null) 'color': color!.toJson(),
if (backgroundColor != null) 'backgroundColor': backgroundColor!.toJson(),
'fontSize': ?fontSize,
if (fontWeight != null) 'fontWeight': fontWeight!.value,
if (fontStyle != null) 'fontStyle': fontStyle!.name,
'letterSpacing': ?letterSpacing,
'wordSpacing': ?wordSpacing,
if (textBaseline != null) 'textBaseline': textBaseline!.name,
'height': ?height,
if (leadingDistribution != null)
'leadingDistribution': leadingDistribution!.name,
if (locale != null) 'locale': locale!.toJson(),
if (foreground != null) 'foreground': foreground!.toJson(),
if (background != null) 'background': background!.toJson(),
if (shadows != null) 'shadows': shadows!.map((e) => e.toJson()).toList(),
if (fontFeatures != null)
'fontFeatures': fontFeatures!.map((e) => e.toJson()).toList(),
if (fontVariations != null)
'fontVariations': fontVariations!.map((e) => e.toJson()).toList(),
if (decoration != null)
'decoration': decoration!.map((e) => e.name).toList(),
if (decorationColor != null) 'decorationColor': decorationColor!.toJson(),
if (decorationStyle != null) 'decorationStyle': decorationStyle!.name,
'decorationThickness': ?decorationThickness,
if (debugLabel != null) 'debugLabel': debugLabel,
if (fontFamily != null) 'fontFamily': fontFamily,
'fontFamilyFallback': ?fontFamilyFallback,
'package': ?package,
if (overflow != null) 'overflow': overflow!.name,
};
}