calculateFluidWidth method
Implementation
double calculateFluidWidth(LayoutBreakpoint breakpoint, double layoutWidth) {
//Distance to next width breakpoint
final width = breakpoints[breakpoint] ?? layoutWidth;
final currentDistance = width - layoutWidth;
final totalDistance = width - breakpoints[breakpoint.smaller]!;
final totalFluidDistance =
maxFluidWidth[breakpoint]! - maxFluidWidth[breakpoint.smaller]!;
final progress = currentDistance / totalDistance;
final maxFluid =
maxFluidWidth[breakpoint.bigger]! - totalFluidDistance * progress;
return maxFluid;
}