fromDynamic static method
Processes a Map or Map-like object into a response. If the map is null then this will return null.
Implementation
static ScreenshotResponse fromDynamic(
dynamic map,
String? message,
bool? success,
) {
late ScreenshotResponse result;
if (map == null) {
throw Exception('[ScreenshotResponse.fromDynamic]: map is null');
} else {
result = ScreenshotResponse(
image: (map['image'] == null ? null : base64Decode(map['image'])) ??
Uint8List(0),
message: message,
success: success,
);
}
return result;
}