fromDynamic static method
Implementation
static TestDeviceInfo fromDynamic(dynamic map) {
TestDeviceInfo result;
if (map == null) {
throw Exception('[TestDeviceInfo.fromDynamic]: map is null');
} else {
final screen = map['screen'] ?? {};
result = TestDeviceInfo.custom(
appIdentifier: map['appIdentifier'],
brand: map['brand'],
buildNumber: map['buildNumber'],
device: map['device'],
deviceGroup: map['deviceGroup'],
devicePixelRatio: JsonClass.parseDouble(screen['devicePixelRatio']),
dips: BaseSize.fromDynamic(screen['dips']),
id: map['id'],
launchId: map['launchId'] ?? _staticLaunchUniqueId,
manufacturer: map['manufacturer'],
model: map['model'],
orientation: map['orientation'],
os: map['os'],
physicalDevice: JsonClass.parseBool(map['physicalDevice']),
pixels: BaseSize.fromDynamic(screen['pixels']),
systemVersion: map['systemVersion'],
);
}
return result;
}