Update platform.dart (#882)

pull/883/head
rodrigo-itao 3 years ago committed by GitHub
parent a663cabaac
commit b2eb6758c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      lib/src/utils/platform.dart

@ -28,9 +28,12 @@ bool isAppleOS([TargetPlatform? targetPlatform]) {
}
Future<bool> isIOSSimulator() async {
if (Platform.isIOS) {
final deviceInfo = DeviceInfoPlugin();
final iosInfo = await deviceInfo.iosInfo;
DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
var osInfo = await deviceInfo.deviceInfo;
if (osInfo is IosDeviceInfo) {
final iosInfo = osInfo as IosDeviceInfo;
return !iosInfo.isPhysicalDevice;
}
return false;

Loading…
Cancel
Save