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 StartScreenshotStreamCommand fromDynamic(
dynamic map,
String id,
DateTime timestamp,
) {
late StartScreenshotStreamCommand result;
if (map == null) {
throw Exception(
'[StartScreenshotStreamCommand.fromDynamic]: map is null');
} else {
result = StartScreenshotStreamCommand(
id: id,
interval: JsonClass.parseDurationFromMillis(map['interval']) ??
const Duration(seconds: 5),
timestamp: timestamp,
);
}
return result;
}