deviceType static method
Returns isDesktop for the nearest DeviceQuery ancestor or DeviceType.unknown, if no such ancestor exists.
Implementation
static DeviceType deviceType(BuildContext context) {
return DeviceQuery.maybeOf(context)?.deviceType ?? DeviceType.unknown;
}