toMap method

Map<String, Object?> toMap()

Implementation

Map<String, Object?> toMap() {
  final conf = <String, Object?>{
    'osType': osType,
    'osVersion': osVersion,
    'deviceVendor': deviceVendor,
    'deviceModel': deviceModel,
    'carrier': carrier,
    'networkType': networkType?.name,
    'networkTechnology': networkTechnology,
    'appleIdfa': appleIdfa,
    'appleIdfv': appleIdfv,
    'availableStorage': availableStorage?.toString(),
    'totalStorage': totalStorage?.toString(),
    'physicalMemory': physicalMemory?.toString(),
    'appAvailableMemory': appAvailableMemory,
    'batteryLevel': batteryLevel,
    'batteryState': batteryState?.name,
    'lowPowerMode': lowPowerMode,
    'isPortrait': isPortrait,
    'resolution': resolution,
    'scale': scale,
    'language': language,
    'androidIdfa': androidIdfa,
    'systemAvailableMemory': systemAvailableMemory?.toString(),
    'appSetId': appSetId,
    'appSetIdScope': appSetIdScope?.name,
  };
  conf.removeWhere((key, value) => value == null);
  return conf;
}