getResolutionPreset function
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;
}
}