CSSScope.fromJson constructor

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

Implementation

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