fromJson method

TextStyle fromJson(
  1. Map<String, dynamic> style
)

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']],
  );
}