Conversation
MarmoPL
left a comment
There was a problem hiding this comment.
Few things:
- Please format
- Delete .g.dart and freezed.dart files (you can add them to git ignore)
- I like that you are checking the status of permissions for localization, but why is it so 'strict'? If I understand correctly, it would just show error message in a case user does not permit location access and do not show them anything. Maybe change it to show that error, but allow to 'skip' it.
| case LocationPermissionStatus.granted: | ||
| title = "Brak dostępu do lokalizacji"; | ||
| message = "Uprawnienia zostały odrzucone. Możesz je zmienić w ustawieniach aplikacji."; | ||
| buttonLabel = "Otwórz ustawienia aplikacji"; | ||
| onPressed = () async { | ||
| await service.openAppSettings(); | ||
| onRetry(); | ||
| }; |
|
|
||
| switch (status) { | ||
| case LocationPermissionStatus.serviceDisabled: | ||
| title = "Lokalizacja jest wyłączona"; |
| <plist version="1.0"> | ||
| <dict> | ||
| <key>NSLocationWhenInUseUsageDescription</key> | ||
| <string>Aplikacja potrzebuje dostępu do lokalizacji.</string> |
There was a problem hiding this comment.
...because? I think Apple would not accept that explanation
There was a problem hiding this comment.
Why did you removed this? It is needed, but with better explanation. Make it: "Aplikacja potrzebuje dostępu do lokalizacji, aby wyświetlić Twoją pozycję na mapie." or something similar
| Future<void> _requestLocation() async { | ||
| final granted = await const LocationPermissionService().requestPermission(); | ||
| if (!mounted) return; | ||
| setState(() => _hasLocationPermission = granted); | ||
| } |
There was a problem hiding this comment.
It is fine for now, but I'm gonna give you a task to change it to provider after another PR is merged :)
|
Looks good, thanks 😃 |
Dodana została mapa offline z lokalizacją i uprawnieniami