getScreenW static method

double getScreenW(
  1. BuildContext context
)

screen width 当前屏幕 宽

Implementation

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