diff --git a/extras/webClient/lib/view/files_page.dart b/extras/webClient/lib/view/files_page.dart index 9beff689d..2569fc062 100644 --- a/extras/webClient/lib/view/files_page.dart +++ b/extras/webClient/lib/view/files_page.dart @@ -1,6 +1,9 @@ +import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:tank_manager/model/app_data.dart'; +import 'package:url_launcher/url_launcher.dart'; class Files extends StatelessWidget { const Files({ @@ -21,7 +24,19 @@ class Files extends StatelessWidget { (fileName, fileSize) => fileRows.add( DataRow( cells: [ - DataCell(Text(fileName.toString())), + DataCell( + GestureDetector( + onTap: () { + String ip = appData.currentTank.ip; + String file = fileName.toString(); + String loc = 'http://$ip/$file'; + unawaited(launchUrl(Uri.parse(loc))); + }, + child: Text( + fileName.toString(), + ), + ), + ), DataCell( Container( alignment: const Alignment(1.0, 0.0), diff --git a/extras/webClient/pubspec.lock b/extras/webClient/pubspec.lock index 9928872b7..ffe20ad5a 100644 --- a/extras/webClient/pubspec.lock +++ b/extras/webClient/pubspec.lock @@ -693,6 +693,70 @@ packages: url: "https://pub.dev" source: hosted version: "2.2.0" + url_launcher: + dependency: "direct main" + description: + name: url_launcher + sha256: eb1e00ab44303d50dd487aab67ebc575456c146c6af44422f9c13889984c00f3 + url: "https://pub.dev" + source: hosted + version: "6.1.11" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: eed4e6a1164aa9794409325c3b707ff424d4d1c2a785e7db67f8bbda00e36e51 + url: "https://pub.dev" + source: hosted + version: "6.0.35" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "9af7ea73259886b92199f9e42c116072f05ff9bea2dcb339ab935dfc957392c2" + url: "https://pub.dev" + source: hosted + version: "6.1.4" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: "207f4ddda99b95b4d4868320a352d374b0b7e05eefad95a4a26f57da413443f5" + url: "https://pub.dev" + source: hosted + version: "3.0.5" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "91ee3e75ea9dadf38036200c5d3743518f4a5eb77a8d13fda1ee5764373f185e" + url: "https://pub.dev" + source: hosted + version: "3.0.5" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "6c9ca697a5ae218ce56cece69d46128169a58aa8653c1b01d26fcd4aad8c4370" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "6bb1e5d7fe53daf02a8fee85352432a40b1f868a81880e99ec7440113d5cfcab" + url: "https://pub.dev" + source: hosted + version: "2.0.17" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "254708f17f7c20a9c8c471f67d86d76d4a3f9c1591aad1e15292008aceb82771" + url: "https://pub.dev" + source: hosted + version: "3.0.6" vector_math: dependency: transitive description: @@ -751,4 +815,4 @@ packages: version: "3.1.1" sdks: dart: ">=3.0.0-0 <4.0.0" - flutter: ">=3.0.0" + flutter: ">=3.3.0" diff --git a/extras/webClient/pubspec.yaml b/extras/webClient/pubspec.yaml index ce5693572..e3ad9c3d4 100644 --- a/extras/webClient/pubspec.yaml +++ b/extras/webClient/pubspec.yaml @@ -28,6 +28,7 @@ dependencies: provider: ^6.0.3 shared_preferences: ^2.0.15 universal_html: ^2.2.1 + url_launcher: ^6.1.11 version: ^3.0.2 dev_dependencies: