isTablet static method

Future<bool> isTablet()

检查当前设备是否为平板电脑。

Implementation

static Future<bool> isTablet() async {
  try {
    return await const MethodChannel('device_utils').invokeMethod('isTablet');
  } on PlatformException catch (e) {
    debugPrint("Failed to check if device is tablet: '${e.message}'.");
    return false;
  }
}