Skip to content

feat: map - #16

Merged
MarmoPL merged 4 commits into
mainfrom
feat/map
Jul 18, 2026
Merged

feat: map#16
MarmoPL merged 4 commits into
mainfrom
feat/map

Conversation

@paintcrafter

Copy link
Copy Markdown
Collaborator

Dodana została mapa offline z lokalizacją i uprawnieniami

@MarmoPL MarmoPL left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few things:

  1. Please format
  2. Delete .g.dart and freezed.dart files (you can add them to git ignore)
  3. 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.

Comment thread lib/widgets/permission_gate.dart Outdated
Comment on lines +99 to +106
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();
};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Granted and show this?

Comment thread lib/widgets/permission_gate.dart Outdated

switch (status) {
case LocationPermissionStatus.serviceDisabled:
title = "Lokalizacja jest wyłączona";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use l10n

Comment thread ios/Runner/Info.plist Outdated
<plist version="1.0">
<dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Aplikacja potrzebuje dostępu do lokalizacji.</string>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...because? I think Apple would not accept that explanation

@MarmoPL MarmoPL added this to the Sprint 1 - Foundation milestone Jul 4, 2026
@MarmoPL MarmoPL linked an issue Jul 4, 2026 that may be closed by this pull request
Comment thread ios/Runner/Info.plist

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread lib/widgets/map_view.dart
Comment on lines +27 to +31
Future<void> _requestLocation() async {
final granted = await const LocationPermissionService().requestPermission();
if (!mounted) return;
setState(() => _hasLocationPermission = granted);
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is fine for now, but I'm gonna give you a task to change it to provider after another PR is merged :)

@MarmoPL MarmoPL changed the title Feat/map feat: map Jul 18, 2026
@MarmoPL

MarmoPL commented Jul 18, 2026

Copy link
Copy Markdown
Member

Looks good, thanks 😃
I pushed a few fixes on top: merged main, moved the location permissions from the debug manifest to the main one (release builds had no location and no internet), restored the iOS location usage description, and fixed two lints.
Heads up for next time: permissions in src/debug/AndroidManifest.xml only apply to debug builds - they need to be in src/main/.
One note: the map is online, not offline - tiles are fetched from openfreemap at runtime. Offline capabilities will be in future task.
Provider refactor coming in a follow-up task 🙂

@MarmoPL
MarmoPL merged commit f16fa9e into main Jul 18, 2026
5 of 7 checks passed
@MarmoPL
MarmoPL deleted the feat/map branch July 18, 2026 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Map SDK

2 participants