Play and pause a video

An introduction to integration testing

Take a picture using the camera

Cookbook

Plugins

Take a picture using the camera

1. Add the required dependencies

2. Get a list of the available cameras

3. Create and initialize the CameraController

4. Use a CameraPreview to display the camera’s feed

5. Take a picture with the CameraController

6. Display the picture with an Image widget

Complete example

Many apps require working with the device’s cameras to
take photos and videos.  Flutter provides the camera plugin
for this purpose. The camera plugin provides tools to get a list of the
available cameras, display a preview coming from a specific camera,
and take photos or videos.