fromDynamic static method
Deserializes the command from a Map or a map-like object into the the
proper data model. This will throw an exception if map
is null.
Implementation
static PingCommand fromDynamic(
dynamic map,
String id,
DateTime timestamp,
) {
late PingCommand result;
if (map == null) {
throw Exception('[PingCommand.fromDynamic]: map is null');
} else {
result = PingCommand(
id: id,
testControllerState: map['testControllerState'] == null
? null
: TestControllerState.fromDynamic(map['testControllerState']),
testDeviceInfo: map['testDeviceInfo'] == null
? null
: TestDeviceInfo.fromDynamic(map['testDeviceInfo']),
timestamp: timestamp,
);
}
return result;
}