DetectDocumentTextResponse.fromJson constructor

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

Implementation

factory DetectDocumentTextResponse.fromJson(Map<String, dynamic> json) {
  return DetectDocumentTextResponse(
    blocks: (json['Blocks'] as List?)
        ?.whereNotNull()
        .map((e) => Block.fromJson(e as Map<String, dynamic>))
        .toList(),
    detectDocumentTextModelVersion:
        json['DetectDocumentTextModelVersion'] as String?,
    documentMetadata: json['DocumentMetadata'] != null
        ? DocumentMetadata.fromJson(
            json['DocumentMetadata'] as Map<String, dynamic>)
        : null,
  );
}