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 1414 FlutterApplication and put your custom class here. -->
1515 <application
1616 android : name =" io.flutter.app.FlutterApplication"
17- android : label =" utopian_rocks "
17+ android : label =" Utopian Rocks Mobile "
1818 android : icon =" @mipmap/ic_launcher" >
1919 <activity
2020 android : name =" .MainActivity"
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
22import 'package:utopian_rocks/provider.dart' ;
33import 'package:utopian_rocks/utils.dart' ;
44import 'package:timeago/timeago.dart' as timeago;
5- import 'package:share/share .dart' ;
5+ import 'package:url_launcher/url_launcher .dart' ;
66
77class ListPage extends StatelessWidget {
88 final String tabname;
@@ -81,8 +81,8 @@ class ListPage extends StatelessWidget {
8181 ),
8282 ),
8383 // 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);
8686 },
8787 );
8888 });
@@ -108,4 +108,13 @@ class ListPage extends StatelessWidget {
108108 return "Reviewed: ${timeago .format (DateTime .fromMillisecondsSinceEpoch (snapshot .data [index ].reviewDate ))}" ;
109109 }
110110 }
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+ }
111120}
Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ dependencies:
2121 cupertino_icons : ^0.1.2
2222 rxdart : ^0.18.1
2323 timeago : ^2.0.7
24- share : ^0.5.3
24+ url_launcher : ^3.0.3
25+ # share: ^0.5.3
2526
2627dev_dependencies :
2728 flutter_test :
You can’t perform that action at this time.
0 commit comments