CSSAtRule.fromJson constructor

CSSAtRule.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory CSSAtRule.fromJson(Map<String, dynamic> json) {
  return CSSAtRule(
    type: CSSAtRuleType.fromJson(json['type'] as String),
    subsection: json.containsKey('subsection')
        ? CSSAtRuleSubsection.fromJson(json['subsection'] as String)
        : null,
    name: json.containsKey('name')
        ? Value.fromJson(json['name'] as Map<String, dynamic>)
        : null,
    styleSheetId: json.containsKey('styleSheetId')
        ? dom.StyleSheetId.fromJson(json['styleSheetId'] as String)
        : null,
    origin: StyleSheetOrigin.fromJson(json['origin'] as String),
    style: CSSStyle.fromJson(json['style'] as Map<String, dynamic>),
  );
}