File tree Expand file tree Collapse file tree 4 files changed +16
-5
lines changed Expand file tree Collapse file tree 4 files changed +16
-5
lines changed Original file line number Diff line number Diff line change
1
+ ## 0.0.1
Original file line number Diff line number Diff line change 14
14
FlutterApplication and put your custom class here. -->
15
15
<application
16
16
android : name =" io.flutter.app.FlutterApplication"
17
- android : label =" utopian_rocks "
17
+ android : label =" Utopian Rocks Mobile "
18
18
android : icon =" @mipmap/ic_launcher" >
19
19
<activity
20
20
android : name =" .MainActivity"
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
2
2
import 'package:utopian_rocks/provider.dart' ;
3
3
import 'package:utopian_rocks/utils.dart' ;
4
4
import 'package:timeago/timeago.dart' as timeago;
5
- import 'package:share/share .dart' ;
5
+ import 'package:url_launcher/url_launcher .dart' ;
6
6
7
7
class ListPage extends StatelessWidget {
8
8
final String tabname;
@@ -81,8 +81,8 @@ class ListPage extends StatelessWidget {
81
81
),
82
82
),
83
83
// Using the share library to deploy a share intent on both android and iOS with the contribution url.
84
- onDoubleTap: () {
85
- Share . share ( '${ snapshot .data [index ].url }' );
84
+ onDoubleTap: () async {
85
+ await _launchUrl ( snapshot.data[index].url);
86
86
},
87
87
);
88
88
});
@@ -108,4 +108,13 @@ class ListPage extends StatelessWidget {
108
108
return "Reviewed: ${timeago .format (DateTime .fromMillisecondsSinceEpoch (snapshot .data [index ].reviewDate ))}" ;
109
109
}
110
110
}
111
+
112
+ // Laucn the steemit/utopian url using the url_launcher package.
113
+ _launchUrl (String url) async {
114
+ if (await canLaunch (url)) {
115
+ await launch (url);
116
+ } else {
117
+ throw 'Could not launch $url ' ;
118
+ }
119
+ }
111
120
}
Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ dependencies:
21
21
cupertino_icons : ^0.1.2
22
22
rxdart : ^0.18.1
23
23
timeago : ^2.0.7
24
- share : ^0.5.3
24
+ url_launcher : ^3.0.3
25
+ # share: ^0.5.3
25
26
26
27
dev_dependencies :
27
28
flutter_test :
You can’t perform that action at this time.
0 commit comments