toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final map = <String, dynamic>{};
  if (optimizeForSpeed != null) {
    map['optimizeForSpeed'] = optimizeForSpeed;
  }
  if (type != null) {
    map['type'] = type;
  }
  if (quality != null) {
    map['quality'] = quality;
  }
  if (fromSurface != null) {
    map['fromSurface'] = fromSurface;
  }
  if (fullPage != null) {
    map['fullPage'] = fullPage;
  }
  if (omitBackground != null) {
    map['omitBackground'] = omitBackground;
  }
  if (path != null) {
    map['path'] = path;
  }
  if (clip != null) {
    map['clip'] = clip?.toJson();
  }
  if (encoding != null) {
    map['encoding'] = encoding;
  }
  if (captureBeyondViewport != null) {
    map['captureBeyondViewport'] = captureBeyondViewport;
  }
  return map;
}