toMap method
Converts this summary to a map using the native field names.
Implementation
Map<String, Object> toMap() {
final Map<String, Object> map = <String, Object>{
'manufacturer': manufacturer,
'brand': brand,
'model': model,
'device': device,
'product': product,
'androidSdk': androidSdk,
'androidRelease': androidRelease,
'isIosNative': isIosNative,
};
void addOptional(String key, Object? value) {
if (value != null) {
map[key] = value;
}
}
addOptional('platformName', platformName);
addOptional('osName', osName);
addOptional('osVersion', osVersion);
addOptional('localizedModel', localizedModel);
addOptional('appEnvironment', appEnvironment);
addOptional('isPhysicalDevice', isPhysicalDevice);
addOptional('isSimulator', isSimulator);
addOptional('physicalMemoryBytes', physicalMemoryBytes);
addOptional('processorCount', processorCount);
addOptional('activeProcessorCount', activeProcessorCount);
addOptional('thermalState', thermalState);
return map;
}