isPhysicalDevice method
On Android: DeviceInfoPlugin().androidInfo.isPhysicalDevice
On iOS: DeviceInfoPlugin().iosInfo.isPhysicalDevice
On web: true
Implementation
@override
Future<bool> isPhysicalDevice() async {
final deviceInfo = DeviceInfoPlugin();
if (isAndroidNative) {
final androidInfo = await deviceInfo.androidInfo;
return androidInfo.isPhysicalDevice ?? true;
} else if (isIOSNative) {
final iosInfo = await deviceInfo.iosInfo;
return iosInfo.isPhysicalDevice;
} else {
// return true as a fallback
return true;
}
}