setFocusMode method Null safety

Future<void> setFocusMode(
  1. FocusMode mode
)

Sets the focus mode for taking pictures.

Implementation

Future<void> setFocusMode(FocusMode mode) async {
  try {
    await CameraPlatform.instance.setFocusMode(_cameraId, mode);
    value = value.copyWith(focusMode: mode);
  } on PlatformException catch (e) {
    throw CameraException(e.code, e.message);
  }
}