isSmallScreen static method

bool isSmallScreen(
  1. BuildContext context, {
  2. double width = 500,
})

Will return true if screen size is less than size. size is default to 500

Implementation

static bool isSmallScreen(BuildContext context, {final double width = 500}) {
  return MediaQuery.of(context).size.width <= width;
}