Text.fromJson constructor

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

Create a new Text instance from json.

Receive a json from where the information is extracted.

Implementation

Text.fromJson(Map<String, dynamic> json)
    : this.text = json['text']['content'] ?? '',
      this.annotations = TextAnnotations.fromJson(json['annotations'] ?? {}),
      this.url = json['href'] != null ? Uri.parse(json['href']) : null;