TextBlock.fromTextBlock constructor
TextBlock.fromTextBlock(
- TextBlock textBlock,
- Size imageSize
Returns an instance of TextBlock from a given textBlock
.
Implementation
factory TextBlock.fromTextBlock(
ml_kit.TextBlock textBlock,
Size imageSize,
) {
List<TextLine> lines = [];
for (var line in textBlock.lines) {
lines.add(TextLine.fromTextLine(
line,
imageSize,
));
}
return TextBlock(
lines: lines,
);
}