toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'deviceId': deviceId,
if (brand != null) 'brand': brand,
if (model != null) 'model': model,
if (systemName != null) 'systemName': systemName,
if (systemVersion != null) 'systemVersion': systemVersion,
if (appVersion != null) 'appVersion': appVersion,
if (buildNumber != null) 'buildNumber': buildNumber,
if (packageName != null) 'packageName': packageName,
if (manufacturer != null) 'manufacturer': manufacturer,
if (deviceName != null) 'deviceName': deviceName,
if (deviceType != null) 'deviceType': deviceType,
if (totalMemory != null) 'totalMemory': totalMemory,
if (usedMemory != null) 'usedMemory': usedMemory,
if (isTablet != null) 'isTablet': isTablet,
if (adId != null) 'adId': adId,
if (androidId != null) 'androidId': androidId,
if (network != null) 'network': network,
if (location != null) 'location': location?.toJson(),
if (timestamp != null) 'timestamp': timestamp,
if (timezone != null) 'timezone': timezone,
'platform': platform,
if (error != null) 'error': error,
};
}