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 ReserveDeviceCommand fromDynamic(
dynamic map,
String id,
DateTime timestamp,
) {
ReserveDeviceCommand result;
if (map == null) {
throw Exception('[ReserveDeviceCommand.fromDynamic]: map is null');
} else {
result = ReserveDeviceCommand(
deviceId: map['deviceId'],
driverName: map['driverName'],
id: id,
timestamp: timestamp,
);
}
return result;
}