8 Commits

Author SHA1 Message Date
d51f3d4ba7 Merge pull request 'Data import and export' (#6) from development into main
All checks were successful
Flutter APK Build / Build Flutter APK (push) Successful in 7m54s
Reviewed-on: #6
2026-01-22 18:47:02 +01:00
b4016e6e5b localized dialog
All checks were successful
Flutter APK Build / Build Flutter APK (pull_request) Successful in 7m28s
2026-01-22 18:23:05 +01:00
eae4a853e9 removed unnecessary code 2026-01-22 18:20:08 +01:00
8eb4cadc85 Merge pull request 'Json export and import feature' (#5) from json-export-feature into development
Reviewed-on: #5
2026-01-22 18:12:01 +01:00
06a76afc42 Merge pull request 'Theme changes' (#4) from development into main
All checks were successful
Flutter APK Build / Build Flutter APK (push) Successful in 6m46s
Reviewed-on: #4
2026-01-21 16:38:03 +01:00
dca8c64555 Merge pull request 'small theme changes' (#3) from development into main
All checks were successful
Flutter APK Build / Build Flutter APK (push) Successful in 6m48s
Reviewed-on: #3
2026-01-21 15:05:11 +01:00
1aaea5f6d9 Merge pull request '[fix] Added basic locatlization' (#2) from development into main
All checks were successful
Flutter APK Build / Calculate Version (push) Successful in 13s
Flutter APK Build / Build Flutter APK (push) Successful in 6m34s
Flutter APK Build / Create Release (push) Has been skipped
Reviewed-on: #2
2026-01-21 14:12:41 +01:00
3a54a077f3 Merge pull request '[fix] added bookmark count number to collections page' (#1) from development into main
All checks were successful
Flutter APK Build / Calculate Version (push) Successful in 15s
Flutter APK Build / Build Flutter APK (push) Successful in 6m37s
Flutter APK Build / Create Release (push) Has been skipped
Reviewed-on: #1
2026-01-21 13:20:49 +01:00
2 changed files with 7 additions and 33 deletions

View File

@@ -1,15 +1,9 @@
// service/maps_launcher_service.dart
import 'dart:io' show Platform; import 'dart:io' show Platform;
import 'package:android_intent_plus/android_intent.dart'; import 'package:android_intent_plus/android_intent.dart';
class MapsLauncherService { class MapsLauncherService {
/// Opens a URL in Google Maps app
/// Falls back to browser if Maps app is not installed
static Future<bool> openInGoogleMaps(String url) async { static Future<bool> openInGoogleMaps(String url) async {
if (!Platform.isAndroid) { if (!Platform.isAndroid) return false;
// Handle iOS or other platforms if needed
return false;
}
try { try {
// Try to open in Google Maps app // Try to open in Google Maps app
@@ -28,36 +22,16 @@ class MapsLauncherService {
await browserIntent.launch(); await browserIntent.launch();
return true; return true;
} catch (e) { } catch (e) {
print('Failed to open maps link: $e');
return false; return false;
} }
} }
} }
/// Opens navigation to specific coordinates
static Future<bool> navigateToCoordinates(
String latitude,
String longitude,
) async {
final url = 'google.navigation:q=$latitude,$longitude';
return openInGoogleMaps(url);
}
/// Opens a search query in Google Maps
static Future<bool> searchInMaps(String query) async {
final encodedQuery = Uri.encodeComponent(query);
final url = 'geo:0,0?q=$encodedQuery';
return openInGoogleMaps(url);
}
/// Shares a Google Maps link or location via Android share sheet
static Future<bool> shareLocation({ static Future<bool> shareLocation({
required String text, required String text,
String? subject, String? subject,
}) async { }) async {
if (!Platform.isAndroid) { if (!Platform.isAndroid) return false;
return false;
}
try { try {
final intent = AndroidIntent( final intent = AndroidIntent(
@@ -72,7 +46,6 @@ class MapsLauncherService {
await intent.launch(); await intent.launch();
return true; return true;
} catch (e) { } catch (e) {
print('Failed to share location: $e');
return false; return false;
} }
} }

View File

@@ -1,6 +1,8 @@
import 'package:flutter/material.dart' show TextButton, Theme; import 'package:flutter/material.dart' show TextButton, Theme;
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import '../../l10n/app_localizations.dart';
class EditDialogTitle extends StatelessWidget { class EditDialogTitle extends StatelessWidget {
const EditDialogTitle({ const EditDialogTitle({
super.key, super.key,
@@ -15,11 +17,10 @@ class EditDialogTitle extends StatelessWidget {
return Row( return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
// TODO: Localize
if (dialogType == DialogType.bookmark) if (dialogType == DialogType.bookmark)
Text('Create Bookmark') Text(AppLocalizations.of(context)!.createBookmark)
else else
Text('Create Collection'), Text(AppLocalizations.of(context)!.createCollection),
if (onDeletePressed != null) if (onDeletePressed != null)
TextButton( TextButton(
@@ -28,7 +29,7 @@ class EditDialogTitle extends StatelessWidget {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
child: Text( child: Text(
'Delete', AppLocalizations.of(context)!.delete,
style: TextStyle(color: Theme.of(context).colorScheme.error), style: TextStyle(color: Theme.of(context).colorScheme.error),
), ),
), ),