getResolutionPreset function

ResolutionPreset getResolutionPreset(
  1. String? preset
)

Returns the resolution preset from string.

Implementation

ResolutionPreset getResolutionPreset(String? preset) {
  switch (preset) {
    case 'max':
      return ResolutionPreset.max;
    case 'ultraHigh':
      return ResolutionPreset.ultraHigh;
    case 'veryHigh':
      return ResolutionPreset.veryHigh;
    case 'high':
      return ResolutionPreset.high;
    case 'low':
      return ResolutionPreset.low;
    case 'medium':
    default:
      return ResolutionPreset.medium;
  }
}