From 676f5341b68db2ed202c8d4ac5bf1a82e38c8c2a Mon Sep 17 00:00:00 2001 From: Janez T Date: Sun, 26 Oct 2025 17:33:01 +0100 Subject: [PATCH] feat: Add URL launcher dependency and implement more info button in settings --- .claude/settings.local.json | 4 ++- ios/Podfile.lock | 6 ++++ ios/Runner.xcodeproj/project.pbxproj | 12 +++---- ios/Runner/Info.plist | 2 +- lib/l10n/app_de.arb | 10 ++++++ lib/l10n/app_en.arb | 10 ++++++ lib/l10n/app_es.arb | 10 ++++++ lib/l10n/app_fr.arb | 10 ++++++ lib/l10n/app_hr.arb | 4 +++ lib/l10n/app_it.arb | 10 ++++++ lib/l10n/app_localizations.dart | 12 +++++++ lib/l10n/app_localizations_de.dart | 6 ++++ lib/l10n/app_localizations_en.dart | 6 ++++ lib/l10n/app_localizations_es.dart | 6 ++++ lib/l10n/app_localizations_fr.dart | 6 ++++ lib/l10n/app_localizations_hr.dart | 6 ++++ lib/l10n/app_localizations_it.dart | 6 ++++ lib/l10n/app_localizations_sl.dart | 6 ++++ lib/l10n/app_sl.arb | 4 +++ lib/screens/settings_screen.dart | 11 +++++++ macos/Flutter/GeneratedPluginRegistrant.swift | 2 ++ pubspec.lock | 32 +++++++++++++++++++ pubspec.yaml | 3 ++ 23 files changed, 176 insertions(+), 8 deletions(-) diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 63c49ab..e7fbbb4 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -33,7 +33,9 @@ "Bash(git --no-pager log -1 --stat)", "Bash(awk:*)", "Bash(flutter test:*)", - "Bash(git log:*)" + "Bash(git log:*)", + "WebFetch(domain:meshcore-sar.dz0ny.dev)", + "Bash(flutter pub get:*)" ], "deny": [], "ask": [] diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 2498db2..c9319d4 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -68,6 +68,8 @@ PODS: - Flutter - FlutterMacOS - SwiftyGif (5.4.5) + - url_launcher_ios (0.0.1): + - Flutter - vibration (3.0.0): - Flutter @@ -86,6 +88,7 @@ DEPENDENCIES: - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) - share_plus (from `.symlinks/plugins/share_plus/ios`) - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) + - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) - vibration (from `.symlinks/plugins/vibration/ios`) SPEC REPOS: @@ -125,6 +128,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/share_plus/ios" shared_preferences_foundation: :path: ".symlinks/plugins/shared_preferences_foundation/darwin" + url_launcher_ios: + :path: ".symlinks/plugins/url_launcher_ios/ios" vibration: :path: ".symlinks/plugins/vibration/ios" @@ -148,6 +153,7 @@ SPEC CHECKSUMS: share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a shared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bb SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4 + url_launcher_ios: 7a95fa5b60cc718a708b8f2966718e93db0cef1b vibration: 69774ad57825b11c951ee4c46155f455d7a592ce PODFILE CHECKSUM: 3c63482e143d1b91d2d2560aee9fb04ecc74ac7e diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index da53f1a..bc2cc91 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -489,7 +489,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 39; + CURRENT_PROJECT_VERSION = 40; DEVELOPMENT_TEAM = JND55328G8; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; @@ -511,7 +511,7 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 39; + CURRENT_PROJECT_VERSION = 40; DEVELOPMENT_TEAM = JND55328G8; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; @@ -530,7 +530,7 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 39; + CURRENT_PROJECT_VERSION = 40; DEVELOPMENT_TEAM = JND55328G8; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; @@ -547,7 +547,7 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 39; + CURRENT_PROJECT_VERSION = 40; DEVELOPMENT_TEAM = JND55328G8; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; @@ -679,7 +679,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 39; + CURRENT_PROJECT_VERSION = 40; DEVELOPMENT_TEAM = JND55328G8; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; @@ -702,7 +702,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 39; + CURRENT_PROJECT_VERSION = 40; DEVELOPMENT_TEAM = JND55328G8; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index cc8b512..466d274 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -43,7 +43,7 @@ CFBundleSignature ???? CFBundleVersion - 39 + 40 LSRequiresIPhoneOS NSBluetoothAlwaysUsageDescription diff --git a/lib/l10n/app_de.arb b/lib/l10n/app_de.arb index bbd27d4..7653d58 100644 --- a/lib/l10n/app_de.arb +++ b/lib/l10n/app_de.arb @@ -392,6 +392,16 @@ "description": "Liste der verwendeten Technologien" }, + "moreInfo": "Mehr Info", + "@moreInfo": { + "description": "Beschriftung für Mehr Info-Button" + }, + + "learnMoreAbout": "Erfahren Sie mehr über MeshCore SAR", + "@learnMoreAbout": { + "description": "Beschreibung des Mehr-Info-Links" + }, + "developer": "Entwickler", "@developer": { "description": "Überschrift des Entwickler-Bereichs" diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index a9ab97f..8f41763 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -392,6 +392,16 @@ "description": "List of technologies used" }, + "moreInfo": "More Info", + "@moreInfo": { + "description": "More info button label" + }, + + "learnMoreAbout": "Learn more about MeshCore SAR", + "@learnMoreAbout": { + "description": "Learn more link description" + }, + "developer": "Developer", "@developer": { "description": "Developer section header" diff --git a/lib/l10n/app_es.arb b/lib/l10n/app_es.arb index 5ea2ebc..22b2127 100644 --- a/lib/l10n/app_es.arb +++ b/lib/l10n/app_es.arb @@ -392,6 +392,16 @@ "description": "Lista de tecnologías utilizadas" }, + "moreInfo": "Más información", + "@moreInfo": { + "description": "Etiqueta del botón Más información" + }, + + "learnMoreAbout": "Más información sobre MeshCore SAR", + "@learnMoreAbout": { + "description": "Descripción del enlace Más información" + }, + "developer": "Desarrollador", "@developer": { "description": "Encabezado de la sección de desarrollador" diff --git a/lib/l10n/app_fr.arb b/lib/l10n/app_fr.arb index e21bf10..8fb07ae 100644 --- a/lib/l10n/app_fr.arb +++ b/lib/l10n/app_fr.arb @@ -392,6 +392,16 @@ "description": "Liste des technologies utilisées" }, + "moreInfo": "Plus d'infos", + "@moreInfo": { + "description": "Libellé du bouton Plus d'infos" + }, + + "learnMoreAbout": "En savoir plus sur MeshCore SAR", + "@learnMoreAbout": { + "description": "Description du lien En savoir plus" + }, + "developer": "Développeur", "@developer": { "description": "En-tête de section Développeur" diff --git a/lib/l10n/app_hr.arb b/lib/l10n/app_hr.arb index 0deed2a..5b56050 100644 --- a/lib/l10n/app_hr.arb +++ b/lib/l10n/app_hr.arb @@ -143,6 +143,10 @@ "technologiesList": "• Flutter za višeplatformski razvoj\n• BLE (Bluetooth Low Energy) za mesh mrežu\n• OpenStreetMap za kartografiju\n• Provider za upravljanje stanjem\n• SharedPreferences za lokalno pohranu", + "moreInfo": "Više informacija", + + "learnMoreAbout": "Saznajte više o MeshCore SAR", + "developer": "Programer", "packageName": "Ime paketa", diff --git a/lib/l10n/app_it.arb b/lib/l10n/app_it.arb index 969349b..ecb909f 100644 --- a/lib/l10n/app_it.arb +++ b/lib/l10n/app_it.arb @@ -392,6 +392,16 @@ "description": "Elenco delle tecnologie utilizzate" }, + "moreInfo": "Maggiori informazioni", + "@moreInfo": { + "description": "Etichetta del pulsante Maggiori informazioni" + }, + + "learnMoreAbout": "Ulteriori informazioni su MeshCore SAR", + "@learnMoreAbout": { + "description": "Descrizione del link Ulteriori informazioni" + }, + "developer": "Sviluppatore", "@developer": { "description": "Intestazione sezione sviluppatore" diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart index 9fbe42b..ad3c8c5 100644 --- a/lib/l10n/app_localizations.dart +++ b/lib/l10n/app_localizations.dart @@ -534,6 +534,18 @@ abstract class AppLocalizations { /// **'• Flutter for cross-platform development\n• BLE (Bluetooth Low Energy) for mesh networking\n• OpenStreetMap for mapping\n• Provider for state management\n• SharedPreferences for local storage'** String get technologiesList; + /// More info button label + /// + /// In en, this message translates to: + /// **'More Info'** + String get moreInfo; + + /// Learn more link description + /// + /// In en, this message translates to: + /// **'Learn more about MeshCore SAR'** + String get learnMoreAbout; + /// Developer section header /// /// In en, this message translates to: diff --git a/lib/l10n/app_localizations_de.dart b/lib/l10n/app_localizations_de.dart index 7fca81c..fd09ae9 100644 --- a/lib/l10n/app_localizations_de.dart +++ b/lib/l10n/app_localizations_de.dart @@ -243,6 +243,12 @@ class AppLocalizationsDe extends AppLocalizations { String get technologiesList => '• Flutter für plattformübergreifende Entwicklung\n• BLE (Bluetooth Low Energy) für Mesh-Netzwerk\n• OpenStreetMap für Kartendarstellung\n• Provider für Zustandsverwaltung\n• SharedPreferences für lokale Speicherung'; + @override + String get moreInfo => 'Mehr Info'; + + @override + String get learnMoreAbout => 'Erfahren Sie mehr über MeshCore SAR'; + @override String get developer => 'Entwickler'; diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart index 11ca265..2b108bc 100644 --- a/lib/l10n/app_localizations_en.dart +++ b/lib/l10n/app_localizations_en.dart @@ -242,6 +242,12 @@ class AppLocalizationsEn extends AppLocalizations { String get technologiesList => '• Flutter for cross-platform development\n• BLE (Bluetooth Low Energy) for mesh networking\n• OpenStreetMap for mapping\n• Provider for state management\n• SharedPreferences for local storage'; + @override + String get moreInfo => 'More Info'; + + @override + String get learnMoreAbout => 'Learn more about MeshCore SAR'; + @override String get developer => 'Developer'; diff --git a/lib/l10n/app_localizations_es.dart b/lib/l10n/app_localizations_es.dart index edb9f76..c7103af 100644 --- a/lib/l10n/app_localizations_es.dart +++ b/lib/l10n/app_localizations_es.dart @@ -243,6 +243,12 @@ class AppLocalizationsEs extends AppLocalizations { String get technologiesList => '• Flutter para desarrollo multiplataforma\n• BLE (Bluetooth Low Energy) para redes mesh\n• OpenStreetMap para mapas\n• Provider para gestión de estado\n• SharedPreferences para almacenamiento local'; + @override + String get moreInfo => 'Más información'; + + @override + String get learnMoreAbout => 'Más información sobre MeshCore SAR'; + @override String get developer => 'Desarrollador'; diff --git a/lib/l10n/app_localizations_fr.dart b/lib/l10n/app_localizations_fr.dart index 833bcd6..38a1d2c 100644 --- a/lib/l10n/app_localizations_fr.dart +++ b/lib/l10n/app_localizations_fr.dart @@ -244,6 +244,12 @@ class AppLocalizationsFr extends AppLocalizations { String get technologiesList => '• Flutter pour le développement multiplateforme\n• BLE (Bluetooth Low Energy) pour réseau maillé\n• OpenStreetMap pour la cartographie\n• Provider pour la gestion d\'état\n• SharedPreferences pour le stockage local'; + @override + String get moreInfo => 'Plus d\'infos'; + + @override + String get learnMoreAbout => 'En savoir plus sur MeshCore SAR'; + @override String get developer => 'Développeur'; diff --git a/lib/l10n/app_localizations_hr.dart b/lib/l10n/app_localizations_hr.dart index f9a2c49..cbc1a95 100644 --- a/lib/l10n/app_localizations_hr.dart +++ b/lib/l10n/app_localizations_hr.dart @@ -242,6 +242,12 @@ class AppLocalizationsHr extends AppLocalizations { String get technologiesList => '• Flutter za višeplatformski razvoj\n• BLE (Bluetooth Low Energy) za mesh mrežu\n• OpenStreetMap za kartografiju\n• Provider za upravljanje stanjem\n• SharedPreferences za lokalno pohranu'; + @override + String get moreInfo => 'Više informacija'; + + @override + String get learnMoreAbout => 'Saznajte više o MeshCore SAR'; + @override String get developer => 'Programer'; diff --git a/lib/l10n/app_localizations_it.dart b/lib/l10n/app_localizations_it.dart index 46f5838..fdb2290 100644 --- a/lib/l10n/app_localizations_it.dart +++ b/lib/l10n/app_localizations_it.dart @@ -243,6 +243,12 @@ class AppLocalizationsIt extends AppLocalizations { String get technologiesList => '• Flutter per lo sviluppo multipiattaforma\n• BLE (Bluetooth Low Energy) per la rete mesh\n• OpenStreetMap per la mappatura\n• Provider per la gestione dello stato\n• SharedPreferences per l\'archiviazione locale'; + @override + String get moreInfo => 'Maggiori informazioni'; + + @override + String get learnMoreAbout => 'Ulteriori informazioni su MeshCore SAR'; + @override String get developer => 'Sviluppatore'; diff --git a/lib/l10n/app_localizations_sl.dart b/lib/l10n/app_localizations_sl.dart index 83b57a0..fe060db 100644 --- a/lib/l10n/app_localizations_sl.dart +++ b/lib/l10n/app_localizations_sl.dart @@ -242,6 +242,12 @@ class AppLocalizationsSl extends AppLocalizations { String get technologiesList => '• Flutter za večplatformni razvoj\n• BLE (Bluetooth Low Energy) za mesh omrežje\n• OpenStreetMap za kartografijo\n• Provider za upravljanje stanja\n• SharedPreferences za lokalno shranjevanje'; + @override + String get moreInfo => 'Več informacij'; + + @override + String get learnMoreAbout => 'Več o MeshCore SAR'; + @override String get developer => 'Razvijalec'; diff --git a/lib/l10n/app_sl.arb b/lib/l10n/app_sl.arb index 11f28d0..c845feb 100644 --- a/lib/l10n/app_sl.arb +++ b/lib/l10n/app_sl.arb @@ -143,6 +143,10 @@ "technologiesList": "• Flutter za večplatformni razvoj\n• BLE (Bluetooth Low Energy) za mesh omrežje\n• OpenStreetMap za kartografijo\n• Provider za upravljanje stanja\n• SharedPreferences za lokalno shranjevanje", + "moreInfo": "Več informacij", + + "learnMoreAbout": "Več o MeshCore SAR", + "developer": "Razvijalec", "packageName": "Ime paketa", diff --git a/lib/screens/settings_screen.dart b/lib/screens/settings_screen.dart index 40f21dc..e5ff609 100644 --- a/lib/screens/settings_screen.dart +++ b/lib/screens/settings_screen.dart @@ -4,6 +4,7 @@ import 'package:package_info_plus/package_info_plus.dart'; import 'package:provider/provider.dart'; import 'package:geolocator/geolocator.dart'; import 'package:latlong2/latlong.dart'; +import 'package:url_launcher/url_launcher.dart'; import '../providers/contacts_provider.dart'; import '../providers/messages_provider.dart'; import '../providers/app_provider.dart'; @@ -1099,6 +1100,16 @@ class _SettingsScreenState extends State { ), ), actions: [ + TextButton.icon( + onPressed: () async { + final url = Uri.parse('https://dz0ny.dev/posts/meshcore-sar/'); + if (await canLaunchUrl(url)) { + await launchUrl(url, mode: LaunchMode.externalApplication); + } + }, + icon: const Icon(Icons.open_in_new), + label: Text(AppLocalizations.of(context)!.moreInfo), + ), TextButton( onPressed: () => Navigator.pop(context), child: Text(AppLocalizations.of(context)!.close), diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index e7fa30f..30033d3 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -15,6 +15,7 @@ import package_info_plus import path_provider_foundation import share_plus import shared_preferences_foundation +import url_launcher_macos func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) @@ -27,4 +28,5 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) + UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) } diff --git a/pubspec.lock b/pubspec.lock index 6653363..b1285f1 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -994,6 +994,30 @@ packages: url: "https://pub.dev" source: hosted version: "0.3.1" + url_launcher: + dependency: "direct main" + description: + name: url_launcher + sha256: f6a7e5c4835bb4e3026a04793a4199ca2d14c739ec378fdfe23fc8075d0439f8 + url: "https://pub.dev" + source: hosted + version: "6.3.2" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: "5c8b6c2d89a78f5a1cca70a73d9d5f86c701b36b42f9c9dac7bad592113c28e9" + url: "https://pub.dev" + source: hosted + version: "6.3.24" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "6b63f1441e4f653ae799166a72b50b1767321ecc263a57aadf825a7a2a5477d9" + url: "https://pub.dev" + source: hosted + version: "6.3.5" url_launcher_linux: dependency: transitive description: @@ -1002,6 +1026,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.2.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "8262208506252a3ed4ff5c0dc1e973d2c0e0ef337d0a074d35634da5d44397c9" + url: "https://pub.dev" + source: hosted + version: "3.2.4" url_launcher_platform_interface: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 8a6db03..a8d76e2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -90,6 +90,9 @@ dependencies: # Vibration vibration: ^3.1.4 + # URL launching + url_launcher: ^6.3.0 + dev_dependencies: flutter_test: sdk: flutter