init static method

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

Implementation

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