CameraController constructor

CameraController(
  1. CameraDescription? description,
  2. ResolutionPreset? resolutionPreset, {
  3. bool? enableAudio = true,
  4. ResolutionPreset? streamingPreset,
  5. bool? androidUseOpenGL = false,
  6. TakePhotoCallback1? takePhotoCallback1,
  7. TakePhotoCallback2? takePhotoCallback2,
  8. bool? getPhotoByBinary,
  9. int captureWidth = 480,
  10. int captureHeight = 640,
})

With takePhotoCallback1, handle the callback function with images. With takePhotoCallback2, handle the callback function with binary(Uint8List). You must set getPhotoByBinary true to use takePhotoCallback2.

Implementation

CameraController(
  this.description,
  this.resolutionPreset, {
  this.enableAudio = true,
  this.streamingPreset,
  this.androidUseOpenGL = false,
  this.takePhotoCallback1,
  this.takePhotoCallback2,
  this.getPhotoByBinary,
  this.captureWidth = 480,
  this.captureHeight = 640,
}) : super(CameraValue.uninitialized());