CSSNavigation.fromJson constructor

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

Implementation

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