getMaxWidth static method
double
getMaxWidth(
- String sizes, {
- required BuildContext context,
- bool isOffset = false,
- double? width,
Returns what is the current prefix based on width
Implementation
static double getMaxWidth(String sizes,
{required BuildContext context, bool isOffset = false, double? width}) {
double maxWidth = width ?? context.width;
Map<String, int> sizeMap = isOffset
? getAllOffsetsValue(
sizes,
)
: getAllColValues(sizes);
String getCurrentPrefix = getPrefixByWidth(maxWidth);
if (isOffset) {
return maxWidth * ((sizeMap[getCurrentPrefix] ?? 0.0) / 12);
} else {
return maxWidth * ((sizeMap[getCurrentPrefix] ?? 1.0) / 12);
}
}