CSSProperty.fromJson constructor
CSSProperty.fromJson(
- Map<String, dynamic> json
)
Implementation
factory CSSProperty.fromJson(Map<String, dynamic> json) {
return CSSProperty(
name: json['name'] as String,
value: json['value'] as String,
important:
json.containsKey('important') ? json['important'] as bool : null,
implicit: json.containsKey('implicit') ? json['implicit'] as bool : null,
text: json.containsKey('text') ? json['text'] as String : null,
parsedOk: json.containsKey('parsedOk') ? json['parsedOk'] as bool : null,
disabled: json.containsKey('disabled') ? json['disabled'] as bool : null,
range: json.containsKey('range')
? SourceRange.fromJson(json['range'] as Map<String, dynamic>)
: null,
longhandProperties: json.containsKey('longhandProperties')
? (json['longhandProperties'] as List)
.map((e) => CSSProperty.fromJson(e as Map<String, dynamic>))
.toList()
: null,
);
}