resolveAutoResizeTextForMeasure static method
Truncates the measured text when maxLength is positive.
Implementation
static String resolveAutoResizeTextForMeasure(String text, int? maxLength) =>
(maxLength != null && maxLength > 0) && text.length > maxLength
? text.substring(0, maxLength)
: text;