isDesktop static method

bool isDesktop(
  1. BuildContext context
)

Returns isDesktop for the nearest DeviceQuery ancestor or false, if no such ancestor exists.

Implementation

static bool isDesktop(BuildContext context) {
  return DeviceQuery.maybeOf(context)?.isDesktop ?? false;
}