Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion extras/webClient/lib/view/files_page.dart
Original file line number Diff line number Diff line change
@@ -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({
Expand All @@ -21,7 +24,19 @@ class Files extends StatelessWidget {
(fileName, fileSize) => fileRows.add(
DataRow(
cells: <DataCell>[
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),
Expand Down
66 changes: 65 additions & 1 deletion extras/webClient/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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"
1 change: 1 addition & 0 deletions extras/webClient/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down