import 'package:device_info_plus/device_info_plus.dart';

class DeviceInfoUtil {
  /// 获取当前Android设备的系统版本
  static Future<int> getAndroidSDKInt() async {
    DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
    AndroidDeviceInfo androidInfo = await deviceInfoPlugin.androidInfo;
    return androidInfo.version.sdkInt;
  }

  /// 获取当前iOS设备的系统版本
  static Future<String> getIOSSystemVersion() async {
    DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
    IosDeviceInfo iosDeviceInfo = await deviceInfoPlugin.iosInfo;
    return iosDeviceInfo.systemVersion;
  }
}
