Fixed Location Permission issue on Android - 1
This commit is contained in:
@ -6,6 +6,7 @@ import 'package:latlong2/latlong.dart';
|
||||
//import 'package:rogapp/widgets/debug_widget.dart';
|
||||
import 'package:flutter_map_location_marker/flutter_map_location_marker.dart';
|
||||
import 'package:rogapp/pages/destination/destination_controller.dart';
|
||||
import 'package:rogapp/pages/permission/permission.dart';
|
||||
|
||||
// LocationControllerクラスは、GetxControllerを継承したクラスであり、位置情報の管理を担当しています。
|
||||
// LocationControllerは以下の機能を提供しています。
|
||||
@ -188,6 +189,18 @@ class LocationController extends GetxController {
|
||||
// Check for location service and permissions before starting the stream
|
||||
// 位置情報サービスの有効性をチェックし、無効な場合はエラーハンドリングを行います。
|
||||
//
|
||||
|
||||
await PermissionController.checkAndRequestPermissions();
|
||||
|
||||
/*
|
||||
bool isPermissionGranted = await PermissionController.checkLocationPermissions();
|
||||
if (!isPermissionGranted) {
|
||||
PermissionController.showPermissionDeniedDialog();
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
bool serviceEnabled = await Geolocator.isLocationServiceEnabled();
|
||||
if (!serviceEnabled) {
|
||||
// Use GetX's context to show a dialog
|
||||
@ -262,6 +275,7 @@ class LocationController extends GetxController {
|
||||
);
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
// 位置情報の設定を行います。z11
|
||||
// Set up the location options
|
||||
|
||||
Reference in New Issue
Block a user