getId method
Implementation
Future getId() async {
var deviceInfo = DeviceInfoPlugin();
if (Platform.isIOS) {
var iosDeviceInfo = await deviceInfo.iosInfo;
deviceId = iosDeviceInfo.identifierForVendor!;
iOSDevice = Platform.isAndroid;
device_name = '${iosDeviceInfo.name}';
deveicedescription =
await 'type:ios|physical_device:${iosDeviceInfo.isPhysicalDevice}|model:${iosDeviceInfo.model}|device_name:${iosDeviceInfo.name}|app_version:${version}|host:-|serial_no:${iosDeviceInfo.identifierForVendor}';
} else if (Platform.isAndroid) {
var androidDeviceInfo = await deviceInfo.androidInfo;
deviceId = androidDeviceInfo.id;
device_name = '${androidDeviceInfo.device}';
deveicedescription =
await 'type:android|physical_device:${androidDeviceInfo.isPhysicalDevice}|model:${androidDeviceInfo.model}|device_name:${androidDeviceInfo.device}|app_version:${version}|host:-${androidDeviceInfo.host}|serial_no:${androidDeviceInfo.serialNumber}';
} else {
deviceId = 'null';
}
return deviceId;
}