Fix iOS location permission request flow
- Changed to automatically request permission if not granted during initialization - Set both _hasLocationPermission and _isNavigationInitialized flags when permission is granted - Ensures iOS system permission dialog is shown on navigation page entry Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
9cb5b51f6d
commit
70e4a439b9
@ -45,7 +45,7 @@ class _NavigationPageState extends ConsumerState<NavigationPage> {
|
|||||||
|
|
||||||
if (!hasPermission) {
|
if (!hasPermission) {
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
_showPermissionDialog();
|
await _requestLocationPermission();
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -171,6 +171,7 @@ class _NavigationPageState extends ConsumerState<NavigationPage> {
|
|||||||
granted: () {
|
granted: () {
|
||||||
setState(() {
|
setState(() {
|
||||||
_hasLocationPermission = true;
|
_hasLocationPermission = true;
|
||||||
|
_isNavigationInitialized = true;
|
||||||
});
|
});
|
||||||
_initializeNavigationSession();
|
_initializeNavigationSession();
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user