maxWordWidth function
Implementation
double maxWordWidth(String text, var component, bool isValue) {
double maxSize = 0.0;
for (String word in text.split(" ")) {
Size size = getTxtSize(
word + ":", altLabelTxtStyle(component: component, isValue: isValue));
if (size.width > maxSize) {
maxSize = size.width;
}
}
return maxSize;
}