PseudoElementMatches.fromJson constructor

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

Implementation

factory PseudoElementMatches.fromJson(Map<String, dynamic> json) {
  return PseudoElementMatches(
    pseudoType: dom.PseudoType.fromJson(json['pseudoType'] as String),
    pseudoIdentifier: json.containsKey('pseudoIdentifier')
        ? json['pseudoIdentifier'] as String
        : null,
    matches: (json['matches'] as List)
        .map((e) => RuleMatch.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}