feat: Add URL launcher dependency and implement more info button in settings

This commit is contained in:
Janez T
2025-10-26 17:33:01 +01:00
parent cec092b8c0
commit 676f5341b6
23 changed files with 176 additions and 8 deletions

View File

@@ -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": []

View File

@@ -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

View File

@@ -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;

View File

@@ -43,7 +43,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>39</string>
<string>40</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSBluetoothAlwaysUsageDescription</key>

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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",

View File

@@ -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"

View File

@@ -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:

View File

@@ -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';

View File

@@ -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';

View File

@@ -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';

View File

@@ -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';

View File

@@ -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';

View File

@@ -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';

View File

@@ -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';

View File

@@ -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",

View File

@@ -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<SettingsScreen> {
),
),
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),

View File

@@ -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"))
}

View File

@@ -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:

View File

@@ -90,6 +90,9 @@ dependencies:
# Vibration
vibration: ^3.1.4
# URL launching
url_launcher: ^6.3.0
dev_dependencies:
flutter_test:
sdk: flutter