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