mirror of
https://github.com/chenasraf/pantry-flutter.git
synced 2026-05-17 17:28:03 +00:00
13 lines
381 B
Dart
13 lines
381 B
Dart
import 'dart:io' show Platform;
|
|
|
|
import 'package:device_info_plus/device_info_plus.dart';
|
|
|
|
bool? _isiOSAppOnMacCache;
|
|
|
|
Future<bool> isiOSAppOnMac() async {
|
|
if (_isiOSAppOnMacCache != null) return _isiOSAppOnMacCache!;
|
|
if (!Platform.isIOS) return _isiOSAppOnMacCache = false;
|
|
final info = await DeviceInfoPlugin().iosInfo;
|
|
return _isiOSAppOnMacCache = info.isiOSAppOnMac;
|
|
}
|