estimateWidth method
Implementation
double estimateWidth() {
final sizeData = size ?? TButtonSize.md;
double width = sizeData.minW;
if (icon != null) {
width += sizeData.icon + sizeData.spacing;
}
if (text != null && text!.isNotEmpty) {
width += text!.length * (sizeData.font * 0.75);
}
return width;
}