Opening Location Permission from the inside of App flutter

Viewed 5092

the page i want to access from inside the app : enter image description here

3 Answers

Using Geolocator Package, you can open location settings as following. Please note that is will only open the device Location page, not the App permission manager.

Geolocator.openLocationSettings();

Use this package called, permission_handler. This will allow you to open the app settings page where you can find the location permission.

usage:

RaisedButton(
            onPressed: () =>  openAppSettings(),
            child: Text("Open app settings"),
          ),

In GeoLocation Package use Geolocator.openAppSettings();

Like that

AlertDialog(
            actions: [
              CupertinoDialogAction(
                child: Text('Back'),
                onPressed: () {
                  if (Platform.isIOS) {
                    exit(0);
                  } else {
                    SystemNavigator.pop();
                  }
                },
              ),
              CupertinoDialogAction(
                child: Text('Settings'),
                onPressed: () {
                  Geolocator.openAppSettings();
                },
              ),
            ],
          ),
Related