GetMatchedStylesForNodeResult.fromJson constructor

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

Implementation

factory GetMatchedStylesForNodeResult.fromJson(Map<String, dynamic> json) {
  return GetMatchedStylesForNodeResult(
    inlineStyle: json.containsKey('inlineStyle')
        ? CSSStyle.fromJson(json['inlineStyle'] as Map<String, dynamic>)
        : null,
    attributesStyle: json.containsKey('attributesStyle')
        ? CSSStyle.fromJson(json['attributesStyle'] as Map<String, dynamic>)
        : null,
    matchedCSSRules: json.containsKey('matchedCSSRules')
        ? (json['matchedCSSRules'] as List)
            .map((e) => RuleMatch.fromJson(e as Map<String, dynamic>))
            .toList()
        : null,
    pseudoElements: json.containsKey('pseudoElements')
        ? (json['pseudoElements'] as List)
            .map((e) =>
                PseudoElementMatches.fromJson(e as Map<String, dynamic>))
            .toList()
        : null,
    inherited: json.containsKey('inherited')
        ? (json['inherited'] as List)
            .map((e) =>
                InheritedStyleEntry.fromJson(e as Map<String, dynamic>))
            .toList()
        : null,
    inheritedPseudoElements: json.containsKey('inheritedPseudoElements')
        ? (json['inheritedPseudoElements'] as List)
            .map((e) => InheritedPseudoElementMatches.fromJson(
                e as Map<String, dynamic>))
            .toList()
        : null,
    cssKeyframesRules: json.containsKey('cssKeyframesRules')
        ? (json['cssKeyframesRules'] as List)
            .map((e) => CSSKeyframesRule.fromJson(e as Map<String, dynamic>))
            .toList()
        : null,
    cssPositionTryRules: json.containsKey('cssPositionTryRules')
        ? (json['cssPositionTryRules'] as List)
            .map(
                (e) => CSSPositionTryRule.fromJson(e as Map<String, dynamic>))
            .toList()
        : null,
    activePositionFallbackIndex:
        json.containsKey('activePositionFallbackIndex')
            ? json['activePositionFallbackIndex'] as int
            : null,
    cssPropertyRules: json.containsKey('cssPropertyRules')
        ? (json['cssPropertyRules'] as List)
            .map((e) => CSSPropertyRule.fromJson(e as Map<String, dynamic>))
            .toList()
        : null,
    cssPropertyRegistrations: json.containsKey('cssPropertyRegistrations')
        ? (json['cssPropertyRegistrations'] as List)
            .map((e) =>
                CSSPropertyRegistration.fromJson(e as Map<String, dynamic>))
            .toList()
        : null,
    cssFontPaletteValuesRule: json.containsKey('cssFontPaletteValuesRule')
        ? CSSFontPaletteValuesRule.fromJson(
            json['cssFontPaletteValuesRule'] as Map<String, dynamic>)
        : null,
    parentLayoutNodeId: json.containsKey('parentLayoutNodeId')
        ? dom.NodeId.fromJson(json['parentLayoutNodeId'] as int)
        : null,
  );
}