RecognizedTextResult.fromMap constructor

RecognizedTextResult.fromMap(
  1. Map map
)

Implementation

factory RecognizedTextResult.fromMap(Map<dynamic, dynamic> map) {
  final rawBlocks = map['blocks'] as List? ?? [];
  return RecognizedTextResult(
    text: map['text'] as String? ?? '',
    blocks: rawBlocks.map((e) => TextBlock.fromMap(e as Map)).toList(),
  );
}