• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: flutter location permissions prompt not appearing

Resolved: flutter location permissions prompt not appearing

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

im trying to use the geolocator package on flutter, ive read its documentation and accordingly inserted the codes
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
i stopped running the app and rerunned it. but it still says E/flutter (10375): [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: User denied permissions to access the device's location.
is there something im missing? any help appreciatedenter image description here

Answer:

Since version 8.0.0 of the geolocator plugin, the implicit requesting of permissions when calling the Geolocator.getCurrentPosition() or Geolocator.getPositionStream() methods have been removed. Starting from version 8.0.0 it is necessary to explicitly call the Geolocator.requestPermission() method before calling the Geolocator.getCurrentPosition() or Geolocator.getPositionStream() methods.
The suggested flow looks something like this:

If you have better answer, please add a comment about this, thank you!

flutter user-permissions
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: Convert function is not working with {fn } in SQL Server

24/03/2023

Resolved: Why reference in pointer array doesn’t have data?

24/03/2023

Resolved: EntityFramework creates/runs migrations using parameterless DataContext instance

24/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.