isMobileDevice function

bool isMobileDevice(
  1. Device? device
)

Check if a device is mobile

Implementation

bool isMobileDevice(Device? device) {
  if (device == null) return false;
  return device.type == 'mobile' ||
      device.type == 'tablet' ||
      device.type == 'wearable';
}