toJson method
Abstract function that concrete classes must implement. This must encode the internal data model to a JSON compatible representation.
While not required, it is suggested to call removeNull
before returning.
Implementation
@override
Map<String, dynamic> toJson() => {
'appIdentifier': appIdentifier,
'brand': brand,
'buildNumber': buildNumber,
'device': device,
'deviceGroup': deviceGroup,
'id': id,
'launchId': launchId,
'manufacturer': manufacturer,
'model': model,
'orientation': orientation,
'os': os,
'physicalDevice': physicalDevice,
'screen': devicePixelRatio == null
? null
: {
'devicePixelRatio': devicePixelRatio,
'dips': dips?.toJson(),
'pixels': pixels?.toJson(),
},
'staticLaunchId': _staticLaunchUniqueId,
'systemVersion': systemVersion,
};