getPxFromDesignPx static method
Implementation
static int getPxFromDesignPx(int designPx) {
MediaQueryData mediaQuery = MediaQueryData.fromWindow(ui.window);
final size = mediaQuery.size * mediaQuery.devicePixelRatio;
// L.e(size.width.toString());
int res = ((size.width * designPx) / 750).toInt();
return res;
}