getScreenW static method

double getScreenW(
  1. BuildContext context
)

screen width 当前屏幕 宽 dp

Implementation

static double getScreenW(BuildContext context) {
  var mediaQuery = MediaQuery.of(context);
  return mediaQuery.size.width;
}