Commit 152c60a 1 parent b0ceacc commit 152c60a Copy full SHA for 152c60a
File tree 3 files changed +82
-2
lines changed
3 files changed +82
-2
lines changed Original file line number Diff line number Diff line change
1
+ import 'dart:async' ;
2
+
1
3
import 'package:flutter/material.dart' ;
2
4
import 'package:provider/provider.dart' ;
3
5
import 'package:tank_manager/model/app_data.dart' ;
6
+ import 'package:url_launcher/url_launcher.dart' ;
4
7
5
8
class Files extends StatelessWidget {
6
9
const Files ({
@@ -21,7 +24,19 @@ class Files extends StatelessWidget {
21
24
(fileName, fileSize) => fileRows.add (
22
25
DataRow (
23
26
cells: < DataCell > [
24
- DataCell (Text (fileName.toString ())),
27
+ DataCell (
28
+ GestureDetector (
29
+ onTap: () {
30
+ String ip = appData.currentTank.ip;
31
+ String file = fileName.toString ();
32
+ String loc = 'http://$ip /$file ' ;
33
+ unawaited (launchUrl (Uri .parse (loc)));
34
+ },
35
+ child: Text (
36
+ fileName.toString (),
37
+ ),
38
+ ),
39
+ ),
25
40
DataCell (
26
41
Container (
27
42
alignment: const Alignment (1.0 , 0.0 ),
Original file line number Diff line number Diff line change @@ -693,6 +693,70 @@ packages:
693
693
url: "https://pub.dev"
694
694
source: hosted
695
695
version: "2.2.0"
696
+ url_launcher:
697
+ dependency: "direct main"
698
+ description:
699
+ name: url_launcher
700
+ sha256: eb1e00ab44303d50dd487aab67ebc575456c146c6af44422f9c13889984c00f3
701
+ url: "https://pub.dev"
702
+ source: hosted
703
+ version: "6.1.11"
704
+ url_launcher_android:
705
+ dependency: transitive
706
+ description:
707
+ name: url_launcher_android
708
+ sha256: eed4e6a1164aa9794409325c3b707ff424d4d1c2a785e7db67f8bbda00e36e51
709
+ url: "https://pub.dev"
710
+ source: hosted
711
+ version: "6.0.35"
712
+ url_launcher_ios:
713
+ dependency: transitive
714
+ description:
715
+ name: url_launcher_ios
716
+ sha256: "9af7ea73259886b92199f9e42c116072f05ff9bea2dcb339ab935dfc957392c2"
717
+ url: "https://pub.dev"
718
+ source: hosted
719
+ version: "6.1.4"
720
+ url_launcher_linux:
721
+ dependency: transitive
722
+ description:
723
+ name: url_launcher_linux
724
+ sha256: "207f4ddda99b95b4d4868320a352d374b0b7e05eefad95a4a26f57da413443f5"
725
+ url: "https://pub.dev"
726
+ source: hosted
727
+ version: "3.0.5"
728
+ url_launcher_macos:
729
+ dependency: transitive
730
+ description:
731
+ name: url_launcher_macos
732
+ sha256: "91ee3e75ea9dadf38036200c5d3743518f4a5eb77a8d13fda1ee5764373f185e"
733
+ url: "https://pub.dev"
734
+ source: hosted
735
+ version: "3.0.5"
736
+ url_launcher_platform_interface:
737
+ dependency: transitive
738
+ description:
739
+ name: url_launcher_platform_interface
740
+ sha256: "6c9ca697a5ae218ce56cece69d46128169a58aa8653c1b01d26fcd4aad8c4370"
741
+ url: "https://pub.dev"
742
+ source: hosted
743
+ version: "2.1.2"
744
+ url_launcher_web:
745
+ dependency: transitive
746
+ description:
747
+ name: url_launcher_web
748
+ sha256: "6bb1e5d7fe53daf02a8fee85352432a40b1f868a81880e99ec7440113d5cfcab"
749
+ url: "https://pub.dev"
750
+ source: hosted
751
+ version: "2.0.17"
752
+ url_launcher_windows:
753
+ dependency: transitive
754
+ description:
755
+ name: url_launcher_windows
756
+ sha256: "254708f17f7c20a9c8c471f67d86d76d4a3f9c1591aad1e15292008aceb82771"
757
+ url: "https://pub.dev"
758
+ source: hosted
759
+ version: "3.0.6"
696
760
vector_math:
697
761
dependency: transitive
698
762
description:
@@ -751,4 +815,4 @@ packages:
751
815
version: "3.1.1"
752
816
sdks:
753
817
dart: ">=3.0.0-0 <4.0.0"
754
- flutter: ">=3.0 .0"
818
+ flutter: ">=3.3 .0"
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ dependencies:
28
28
provider : ^6.0.3
29
29
shared_preferences : ^2.0.15
30
30
universal_html : ^2.2.1
31
+ url_launcher : ^6.1.11
31
32
version : ^3.0.2
32
33
33
34
dev_dependencies :
You can’t perform that action at this time.
0 commit comments