iosDeviceInfos method
Map<String, dynamic>
iosDeviceInfos(
- IosDeviceInfo data
)
Implementation
Map<String, dynamic> iosDeviceInfos(IosDeviceInfo data) {
// ignore: invalid_assignment
String? osVersion = data.systemVersion;
// ignore: unnecessary_null_comparison
if (osVersion != null) {
//Split parts with '.' delimiter
List<String>? resultingOSV = osVersion.split(".");
if ((resultingOSV.length) > 2) {
osVersion = resultingOSV[0] + "." + resultingOSV[1];
}
}
return <String, dynamic>{
"os": "iOS",
"osr": data.systemVersion,
"osn": data.systemName,
"osv": osVersion,
"events": events.map((event) => event.customJsonString()),
"mdl": data.name,
};
}