Is there any way to pass the CameraController between widgets in Flutter? My app requires the camera to be on multiple pages for the user to preview their recording and align objects. all the ways I have tried to pass the camera between pages has led to the application crashing on a physical device (ie initializing the camera on the first page and passing it between pages, creating a separate class for the camera to display the camera preview.)
Is there a Provider I can use?
Thanks!
You will make the CameraController
static
and when you are going to use it in another page you wil call it this way: CameraController.class
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.