CameraLayoutBuilder typedef

CameraLayoutBuilder = Widget Function(CameraState state, Preview preview)

This is the builder for your camera interface Using the state you can do anything you need without having to think about the camera flow On app start we are in PreparingCameraState Then depending on the initialCaptureMode you set you will be PhotoCameraState or VideoCameraState Starting a video will push a VideoRecordingCameraState Stopping the video will push back the VideoCameraState

If you need to call specific function for a state use the 'when' function.


typedef CameraLayoutBuilder = Widget Function(
  CameraState state,

  /// [previewSize] not clipped
  //PreviewSize previewSize,

  /// [previewRect] size might be different than [previewSize] if it has been
  /// clipped. It is often clipped in 1:1 ratio. Use it to show elements
  /// relative to the preview (inside or outside for instance)
  //Rect previewRect,

  Preview preview,