getScreenWidth static method

double getScreenWidth({
  1. required BuildContext context,
})

Function to get the current width of the screen.

Implementation

static double getScreenWidth({required BuildContext context}) {
  return MediaQuery.of(context).size.width;
}