setSessionPreset method
set Session Preset Only supports ios
Implementation
Future<void> setSessionPreset(String sessionPreset) async {
if (!value.isInitialized! || _isDisposed) {
throw CameraException(
'Uninitialized CameraController',
'setSessionPreset was called on uninitialized CameraController',
);
}
if (!Platform.isIOS) {
throw CameraException(
'Unsupported platforms.',
'setSessionPreset Only supports Ios.',
);
}
try {
await _channel.invokeMethod<void>(
'setSessionPreset',
<String, dynamic>{
"sessionPreset": sessionPreset
},
);
} on PlatformException catch (e) {
throw CameraException(e.code, e.message);
}
}