debugSizeByText property
Size
get
debugSizeByText
Implementation
Size get debugSizeByText {
double wMax = 0;
double hMax = 0;
double wLine = 0;
double hLine = 0;
for (final line in tokens) {
for (final part in line) {
if (part is WordPartToken) {
wLine += part.sizeCurrent!.width;
hLine = max(hLine, part.sizeCurrent!.height);
} else if (part is TabsAndSpacesToken) {
wLine += part.sizeCurrent!.width;
hLine = max(hLine, part.sizeCurrent!.height);
}
}
wMax = max(wMax, wLine);
hMax = hMax + hLine;
wLine = 0;
hLine = 0;
}
return Size(wMax, hMax);
}