CodeHighlight.fromJson constructor

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

Implementation

factory CodeHighlight.fromJson(
  Map<String, dynamic> json,
) {
  if (json.containsKey('rgb')) {
    return ColorHighlight.fromJson(json);
  } else {
    return BoldHighlight.fromJson(json);
  }
}