Opening Location Permission from the inside of App flutter

3,435

Solution 1

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();

Solution 2

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"),
          ),
Share:
3,435
Aymen TLILI
Author by

Aymen TLILI

Updated on December 27, 2022

Comments

  • Aymen TLILI
    Aymen TLILI over 1 year

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

    • fartem
      fartem over 3 years
      Try this plugin.
    • Dhara Patel
      Dhara Patel over 3 years
      Use permission_handler for this, pub.dev/packages/permission_handler
    • Aymen TLILI
      Aymen TLILI over 3 years
      i am already using this package but it doesn't take me to this page specifecally, it opens app setting in general. @fartem
    • Aymen TLILI
      Aymen TLILI over 3 years
      @DharaPatel permission_handler package doesn't do the required job too
  • Aymen TLILI
    Aymen TLILI over 3 years
    i need to open the app permission manager on the location tab specifcally
  • dm_tr
    dm_tr over 3 years
    Unless you build your own channel to open a specific Android Intent