fromJson method
Implementation
TextStyle fromJson(Map<String, dynamic> style) {
return TextStyle(
color: style['color'] != null ? Color(style['color']) : null,
fontSize: style['fontSize'] ?? 16.0,
letterSpacing: style['letterSpacing'] ?? 1.0,
fontWeight: FontWeight.values[style['fontWeight']],
fontStyle: FontStyle.values[style['fontStyle']],
);
}