CSSSupports.fromJson constructor

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

Implementation

factory CSSSupports.fromJson(Map<String, dynamic> json) {
  return CSSSupports(
    text: json['text'] as String,
    active: json['active'] as bool? ?? false,
    range: json.containsKey('range')
        ? SourceRange.fromJson(json['range'] as Map<String, dynamic>)
        : null,
    styleSheetId: json.containsKey('styleSheetId')
        ? StyleSheetId.fromJson(json['styleSheetId'] as String)
        : null,
  );
}