MyCamera constructor

const MyCamera({
  1. Key? key,
  2. CameraType? initialCameraType,
  3. CameraPreviewRatio? cameraPreviewRatio,
  4. FlashType? flashType,
  5. bool? bestPictureSize,
  6. required CameraCreatedCallback onCameraCreated,
  7. required ImageCapturedCallback onImageCaptured,
  8. String? fileNamePrefix,
})

Implementation

const MyCamera({
  Key? key,
  CameraType? initialCameraType,
  CameraPreviewRatio? cameraPreviewRatio,
  FlashType? flashType,
  bool? bestPictureSize,
  required this.onCameraCreated,
  required this.onImageCaptured,
  this.fileNamePrefix,
})  : this.initialCameraType = initialCameraType ?? CameraType.rear,
      this.cameraPreviewRatio =
          cameraPreviewRatio ?? CameraPreviewRatio.r16_9,
      this.flashType = flashType ?? FlashType.auto,
      this.bestPictureSize = bestPictureSize ?? true,
      super(key: key);