ScreenshotParams.fromJson constructor

ScreenshotParams.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory ScreenshotParams.fromJson(Map<String, dynamic> json) {
  return ScreenshotParams(
    format: json.containsKey('format')
        ? ScreenshotParamsFormat.fromJson(json['format'] as String)
        : null,
    quality: json.containsKey('quality') ? json['quality'] as int : null,
    optimizeForSpeed: json.containsKey('optimizeForSpeed')
        ? json['optimizeForSpeed'] as bool
        : null,
  );
}