FontFace.fromJson constructor
FontFace.fromJson(
- Map<String, dynamic> json
)
Implementation
factory FontFace.fromJson(Map<String, dynamic> json) {
return FontFace(
fontFamily: json['fontFamily'] as String,
fontStyle: json['fontStyle'] as String,
fontVariant: json['fontVariant'] as String,
fontWeight: json['fontWeight'] as String,
fontStretch: json['fontStretch'] as String,
fontDisplay: json['fontDisplay'] as String,
unicodeRange: json['unicodeRange'] as String,
src: json['src'] as String,
platformFontFamily: json['platformFontFamily'] as String,
fontVariationAxes: json.containsKey('fontVariationAxes')
? (json['fontVariationAxes'] as List)
.map((e) => FontVariationAxis.fromJson(e as Map<String, dynamic>))
.toList()
: null,
);
}