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