AwesomeCameraModeSelector#

Swap between photo and video

Switch between PHOTO and VIDEO mode easily with this widget.

If you are using CameraAwesomeBuilder.awesome() builder with no customization on the UI, you are already using it behind the scene.

However, if you made your own custom UI using CameraAwesomeBuilder.custom() or you've set up a different middleContentBuilder in CameraAwesomeBuiilder.awesome(), you may want to use it.

Here is an example:

CameraAwesomeBuilder.custom(
  saveConfig: ...,
  builder: (state, previewSize, previewRect) {
    return Stack(
      fit: StackFit.expand,
      children: <Widget>[
        YourCameraPreview(),
        Positioned.fill(
          child: SafeArea(
            child: Column(children: [
              // Rest of your UI, e.g.: Flash button
              AwesomeCameraModeSelector(state: state),
              // Rest of your UI, e.g.: Button to take photos
            ]),
          ),
        ),
      ],
    );
  },
  // other parameters
);