TextAnnotations.fromJson constructor

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

Create a new text annotation instance from json.

Receive a json from where the information is extracted.

Implementation

TextAnnotations.fromJson(Map<String, dynamic> json)
    : this.bold = json['bold'] ?? false,
      this.italic = json['italic'] ?? false,
      this.strikethrough = json['strikethrough'] ?? false,
      this.underline = json['underline'] ?? false,
      this.code = json['code'] ?? false,
      this.color = stringToColorType(json['color'] ?? '');