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 AnnounceDeviceCommand fromDynamic(
dynamic map,
String id,
DateTime timestamp,
) {
AnnounceDeviceCommand result;
if (map == null) {
throw Exception('[AnnounceDeviceCommand.fromDynamic]: map is null');
} else {
result = AnnounceDeviceCommand(
device: TestDeviceInfo.fromDynamic(map['device']),
id: id,
salt: map['salt'],
testControllerState:
TestControllerState.fromDynamic(map['testControllerState']),
timestamp: timestamp,
);
}
return result;
}