CameraMacOSRawView constructor

const CameraMacOSRawView({
  1. Key? key,
  2. bool usePlatformView = false,
  3. Size? cameraSize,
  4. int? textureId,
  5. FilterQuality filterQuality = FilterQuality.low,
  6. dynamic onPlatformViewCreated(
    1. int id
    )?,
})

Creates a raw camera view widget.

When usePlatformView is false (default), the widget will display the camera using a Texture widget. The textureId can be provided explicitly, or it will be automatically retrieved from the platform channel if the camera has been initialized.

When usePlatformView is true, cameraSize must be provided.

Implementation

const CameraMacOSRawView({
  super.key,
  this.usePlatformView = false,
  this.cameraSize,
  this.textureId,
  this.filterQuality = FilterQuality.low,
  this.onPlatformViewCreated,
}) : assert(
        !usePlatformView || cameraSize != null,
        'cameraSize must not be null when usePlatformView is true',
      );