TextDetection.fromJson constructor

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

Implementation

factory TextDetection.fromJson(Map<String, dynamic> json) {
  return TextDetection(
    confidence: json['Confidence'] as double?,
    detectedText: json['DetectedText'] as String?,
    geometry: json['Geometry'] != null
        ? Geometry.fromJson(json['Geometry'] as Map<String, dynamic>)
        : null,
    id: json['Id'] as int?,
    parentId: json['ParentId'] as int?,
    type: (json['Type'] as String?)?.toTextTypes(),
  );
}