checkDeviceTabOrMobile static method

bool checkDeviceTabOrMobile(
  1. BuildContext context
)

check if device is a mobile set or tablet set if mobile then returns true if tablet then it returns false

Implementation

static bool checkDeviceTabOrMobile(BuildContext context){
  double smallestDimension = MediaQuery.of(context).size.shortestSide;
  return smallestDimension < 600;
}