isMobile static method

bool isMobile(
  1. BuildContext context
)

Checks if the current device is a mobile device.

Returns true if the screen width is less than 500 pixels.

Implementation

static bool isMobile(BuildContext context) => MediaQuery.of(context).size.width < 500;