init static method

Future<bool?> init(
  1. SensorConfig sensorConfig,
  2. bool enableImageStream,
  3. bool enablePhysicalButton, {
  4. CaptureMode captureMode = CaptureMode.photo,
  5. required ExifPreferences exifPreferences,
  6. required VideoOptions? videoOptions,
  7. required bool mirrorFrontCamera,
})

Implementation

static Future<bool?> init(
  SensorConfig sensorConfig,
  bool enableImageStream,
  bool enablePhysicalButton, {
  CaptureMode captureMode = CaptureMode.photo,
  required ExifPreferences exifPreferences,
  required VideoOptions? videoOptions,
  required bool mirrorFrontCamera,
}) async {
  return CameraInterface()
      .setupCamera(
        sensorConfig.sensors.map((e) {
          return e.toPigeon();
        }).toList(),
        sensorConfig.aspectRatio.name.toUpperCase(),
        sensorConfig.zoom,
        mirrorFrontCamera,
        enablePhysicalButton,
        sensorConfig.flashMode.name.toUpperCase(),
        captureMode.name.toUpperCase(),
        enableImageStream,
        exifPreferences,
        videoOptions,
      )
      .then((value) => true);
}