fromMap static method

Creates settings from the map used by the background processor.

Implementation

static ImageClipProcessingSettings fromMap(Map<Object?, Object?>? map) {
  if (map == null) {
    return const ImageClipProcessingSettings();
  }
  return ImageClipProcessingSettings(
    maxInputPixels: _positiveNullableIntOf(map['maxInputPixels']),
    maxOutputPixels: _positiveNullableIntOf(map['maxOutputPixels']),
    autoDownscale: _boolOf(map['autoDownscale'], fallback: true),
  );
}