widthPct method

double widthPct(
  1. double fraction
)

Returns fraction (0-1) of screen width in pixels

Implementation

double widthPct(double fraction) => fraction * widthPx;