create abstract method

Future<XCameraCreateResult> create({
  1. required String cameraId,
  2. required bool enableAudio,
  3. required XResolutionPreset preset,
})

Allocate a native camera instance bound to cameraId. Returns the handle (for subsequent calls), the FlutterTexture id (for the preview widget), and the sensor-natural-orientation preview size.

Throws XCameraException("device_busy") if another instance already holds the device, or XCameraException("audio_busy") when enableAudio is true and another instance holds the app-global audio session.

Implementation

Future<XCameraCreateResult> create({
  required String cameraId,
  required bool enableAudio,
  required XResolutionPreset preset,
});