applySideBarWidth method
- BuildContext context,
- double width
Returns corrected according to the side bar constraints width
value.
Implementation
double applySideBarWidth(BuildContext context, double width) {
double maxWidth = context.width * sideBarMaxWidthPercentage;
if (maxWidth < sideBarMinWidth) {
maxWidth = sideBarMinWidth;
}
return width.clamp(sideBarMinWidth, maxWidth);
}