iOS Development

ios – How can I forestall it from going to the applying settings after I click on on the do not permit button in flutter app?

I’ve an flutter app and there’s a drawback concerning the digital camera permission for IOS platform.

There are 5 buttons in bottomnavigations and center of them go to the digital camera display screen (inde worth 2)

It really works effectively for android platform however there’s a drawback about IOS.

Once I go to the digital camera icon (index worth 2) it reveals permission popup its okay.You recognize there are two choices like one among them Do not Permit and one other one is Permit.

If I click on Permit perform works effectively but when I click on the Do not Permit it goes to the appsettings in telephone settings.Nonetheless, after I click on on Do not Permit, it shouldn’t go to there.

permission a part of my code like beneath and if somebody assist me I might be very pleased ;

            if (worth == 2 ) {
              PermissionStatus standing = await Permission.digital camera.request();
              if (Platform.isAndroid && standing.isGranted) {
                PermissionStatus micro =
                    await Permission.microphone.request();
                if (micro.isGranted) {
                  DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
                  AndroidDeviceInfo androidInfo =
                      await deviceInfo.androidInfo;
                  if (androidInfo.model.sdkInt >= 33) {
                    PermissionStatus photograph =
                        await Permission.photographs.request();
                    PermissionStatus video =
                        await Permission.movies.request();
                    if (photograph.isGranted == true &&
                        video.isGranted == true) {
                      Navigator.push(
                        context,
                        MaterialPageRoute(
                          builder: (context) => CameraScreen(),
                        ),
                      ).then((worth) {
                        BubblyCamera.cameraDispose;
                      });
                    }
                  } else {
                    PermissionStatus standing =
                        await Permission.storage.request();
                    if (standing.isGranted) {
                      Navigator.push(
                        context,
                        MaterialPageRoute(
                          builder: (context) => CameraScreen(),
                        ),
                      ).then((worth) {
                        BubblyCamera.cameraDispose;
                      });
                    }
                  }
              }
            } else {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (context) => CameraScreen(),
                  ),
                ).then((worth) {
                  BubblyCamera.cameraDispose;
                });
              }
            }

after I click on on Do not Permit, it shouldn’t go to the appsettings in telephone settings

Credit: www.ismmailgsm.com

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button