일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- exception
- permissiondeniedexception
- providernotfoundexception
- flutter_dotenv
- Flutter
- appstroe connect guideline
- guideline 4.3(a)
- appstore connect guideline
- 채팅 메시지 정렬
- undefined name
- withopacity
- 플러터
- tflite_flutter
- flutter_secure_storage
- dart sdk version upgrade
- app stroe connect guideline
- youtube_player_flutter
- buildcontext
- exception caught by image resource service
- flutter doctor -v
- AI
- .dio
- information needed
- app completeness
- guideline 1.5
- infinity or nan toint
- 에러
- pub.dev
- GetX
- app store connect guideline
Archives
- Today
- Total
min_chan님의 블로그
[Flutter] - PermissionDeniedException User denied permissions to access the device's location. 본문
Flutter
[Flutter] - PermissionDeniedException User denied permissions to access the device's location.
min_chan 2025. 1. 15. 10:08
에러 코드 & 사진
class _LoadingPageState extends State<LoadingPage> {
Future<void> getLocation() async {
Position position = await Geolocator.getCurrentPosition(
desiredAccuracy: LocationAccuracy.high);
print(position);
}
해결방법
- pub.dev에서 찾아본 결과 해당 코드를 추가해 주면 된다고 한다.
해결 코드 & 사진
class _LoadingPageState extends State<LoadingPage> {
Future<void> getLocation() async {
LocationPermission permission = await Geolocator.requestPermission();
Position position = await Geolocator.getCurrentPosition(
desiredAccuracy: LocationAccuracy.high);
print(position);
}
- requestPermission이 잘 나오는 것을 볼 수 있다 ^^*
'Flutter' 카테고리의 다른 글
[Flutter] - Don't use 'BuildContext's across async gaps, guarded by an unrelated 'mounted' check. (0) | 2025.01.17 |
---|---|
[Flutter] - pub get failed (0) | 2025.01.16 |
[Flutter] - BOTTOM OVERFLOWED BY ~PIXELS (0) | 2025.01.14 |
[Flutter] - Dart SDK version upgrade (5) | 2025.01.13 |
[Flutter] - Warning: dart on your path resolves to~ (0) | 2025.01.10 |