GmoCameraPicker constructor
GmoCameraPicker({
- Key? key,
- bool enableRecording = false,
- bool onlyEnableRecording = false,
- bool enableTapRecording = false,
- bool enableAudio = true,
- bool enableSetExposure = true,
- bool enableExposureControl = true,
- bool enablePinchToZoom = true,
- bool enablePullToZoomInRecord = true,
- bool shouldAutoPreviewVideo = false,
- Duration? maximumRecordingDuration = const Duration(seconds: 15),
- ThemeData? theme,
- ResolutionPreset resolutionPreset = ResolutionPreset.max,
- int cameraQuarterTurns = 0,
- 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();
}
}