GmoCameraPicker constructor

GmoCameraPicker({
  1. Key? key,
  2. bool enableRecording = false,
  3. bool onlyEnableRecording = false,
  4. bool enableTapRecording = false,
  5. bool enableAudio = true,
  6. bool enableSetExposure = true,
  7. bool enableExposureControl = true,
  8. bool enablePinchToZoom = true,
  9. bool enablePullToZoomInRecord = true,
  10. bool shouldAutoPreviewVideo = false,
  11. Duration? maximumRecordingDuration = const Duration(seconds: 15),
  12. ThemeData? theme,
  13. ResolutionPreset resolutionPreset = ResolutionPreset.max,
  14. int cameraQuarterTurns = 0,
  15. TextDelegate? textDelegate,
})

Implementation

GmoCameraPicker({
  Key? key,
  this.enableRecording = false,
  this.onlyEnableRecording = false,
  this.enableTapRecording = false,
  this.enableAudio = true,
  this.enableSetExposure = true,
  this.enableExposureControl = true,
  this.enablePinchToZoom = true,
  this.enablePullToZoomInRecord = true,
  this.shouldAutoPreviewVideo = false,
  this.maximumRecordingDuration = const Duration(seconds: 15),
  this.theme,
  this.resolutionPreset = ResolutionPreset.max,
  this.cameraQuarterTurns = 0,
  TextDelegate? textDelegate,
})  : assert(
        enableRecording == true || onlyEnableRecording != true,
        'Recording mode error.',
      ),
      super(key: key) {
  if (textDelegate != null) {
    Constants.textDelegate = textDelegate;
  } else if (enableRecording && onlyEnableRecording && enableTapRecording) {
    Constants.textDelegate = DefaultTextDelegateWithTapRecording();
  } else if (enableRecording && onlyEnableRecording) {
    Constants.textDelegate = DefaultTextDelegateWithOnlyRecording();
  } else if (enableRecording) {
    Constants.textDelegate = DefaultTextDelegateWithRecording();
  } else {
    Constants.textDelegate = DefaultTextDelegate();
  }
}