I don't know for some reason url_launcher
(https://pub.dev/packages/url_launcher) is not working after downloading app from google playstore. In debug mode it is working the way it should be. But after uploading app on playstore and downloading it from there, url launcher is not launching any url. WHY is that?
import 'package:url_launcher/url_launcher.dart';
onTap: () {
launchURL("https://www.google.com");
},
..............
launchURL(String url) async {
if (await canLaunch(url)) {
await launch(url);
} else {
throw 'Could not launch $url';
}
}
pubspec.yaml
url_launcher: ^5.7.6
I've also added android.permission.INTERNET
I'm not using latest version of url_launcher
so may be using latest version will solve the issue BUT problem with it is that latest version of url_launcher
needs latest version of flutter. Is it safe to upgrade flutter version? I can't take a risk of causing any more issues as my app is already in production
This is what I get when I try to upgrade to url_launcher: ^5.7.10
which is the latest version and run flutter pub get
[xxxxx] flutter pub get
Running "flutter pub get" in xxxxx...
The current Flutter SDK version is 1.22.0-9.0.pre.
Because url_launcher >=5.7.7 <6.0.0-nullsafety depends on url_launcher_platform_interface >=1.0.9 <2.0.0-nullsafety which requires Flutter SDK version >=1.22.0 <2.0.0, url_launcher >=5.7.7 <6.0.0-nullsafety is forbidden.
So, because xxxxx depends on url_launcher ^5.7.10, version solving failed.
pub get failed (1; So, because storeifie depends on url_launcher ^5.7.10, version solving failed.)
exit code 1