isDesktop static method

bool isDesktop(
  1. BuildContext context
)

Checks if the current device is a desktop.

Returns true if the screen width is 1024 pixels or more.

Implementation

static bool isDesktop(BuildContext context) => MediaQuery.of(context).size.width >= 1024;