getType method

DeviceProxyType getType(
  1. BuildContext context,
  2. Orientation orientation
)

Implementation

DeviceProxyType getType(BuildContext context, Orientation orientation) {
  final size = MediaQuery.of(context).size.shortestSide;
  return size > threshold ? DeviceProxyType.tablet : DeviceProxyType.mobile;
}