Word.fromJson constructor

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

Implementation

factory Word.fromJson(Map<String, dynamic> json) => Word(
      text: json["text"] as String,
      confidence: (json["confidence"] as num).toDouble(),
      roi: (json["roi"] as List<dynamic>)
          .map((it) => Point<double>(
              ((it as Map<String, dynamic>)["x"] as num).toDouble(),
              ((it)["y"] as num).toDouble()))
          .toList(),
      glyphs: (json["glyphs"] as List<dynamic>)
          .map((it) => Glyph.fromJson(it as Map<String, dynamic>))
          .toList(),
    );