normalizeBorderSide method
Decreases borderSide
to <= width / 2
Implementation
BorderSide normalizeBorderSide(BorderSide? borderSide, double width) {
if (borderSide == null) {
return defaultBorderSide;
}
double borderWidth;
if (borderSide.width > width / 2) {
borderWidth = width / 2.toDouble();
} else {
borderWidth = borderSide.width;
}
return borderSide.copyWith(width: borderWidth);
}