maxWordWidth function

double maxWordWidth(
  1. String text,
  2. dynamic component,
  3. bool isValue
)

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;
}