Closed robertoltrocha closed 3 years ago
Hi, thank you for your kindness! Of course, you can already do it like this I think :
...
onTap: () async {
final String filePath = '${testDir.path}/${DateTime.now().millisecondsSinceEpoch}.jpg';
disableButton();
await _pictureController.takePicture(filePath);
enableButton();
},
Depending on what is your state management solution, enableButton and disableButton will be different.
Just avoid to refresh the whole page as we restart the camera if you do.
Hope this helps you.
Hi, Thank you for your response.
Hi, I would like to thank you for your plugin, very useful and modern. After taking a photo, I am saving it in a database, but I would like that while this operation is happening, that the button to take the photo be disabled or changed color. is it possible to implement something like "enable: true or enable: false" or "color: Colors.gray"?