w method

double w(
  1. double value
)

Scale value proportionally to design reference width.

If your design mockup is 375px wide and you set a widget to 100px, context.w(100) will scale it proportionally on any screen width.

Implementation

double w(double value) => value * (screenWidth / _config.designSize.width);