_getFromCamera() async {
XFile? pickedFile = await ImagePicker().pickImage(
source: ImageSource.camera,
maxWidth: 1800,
maxHeight: 1800,
);
}
It is working fine for
source: ImageSource.gallery,
but for camera, it is not working
I have tried at first flutter version upgrading, installing
permission_handler
package but not working after building the apps
At first, need to add permission in AndroidManifest.xml as follows:
After that, install permission_handler package.
Then the build will work for both camera and gallery. It will ask for permission and works fine.