setDescription method

Future<void> setDescription(
  1. CameraDescription description
)

Sets the description of the camera.

Throws a CameraException if setting the description fails.

Implementation

Future<void> setDescription(CameraDescription description) async {
  if (value.isRecordingVideo) {
    await CameraPlatform.instance.setDescriptionWhileRecording(description);
    value = value.copyWith(description: description);
  } else {
    if (_initializeFuture != null) {
      await _initializeFuture;
      await CameraPlatform.instance.dispose(_cameraId);
    }

    await _initializeWithDescription(description);
  }
}