build: update url_launcher
This commit is contained in:
parent
bad5327928
commit
8114cff317
|
@ -742,7 +742,7 @@ class AuthModel with ChangeNotifier {
|
|||
final repoScope = publicOnly ? 'public_repo' : 'repo';
|
||||
final scope = Uri.encodeComponent(
|
||||
['user', repoScope, 'read:org', 'notifications'].join(','));
|
||||
launchUrl(
|
||||
launchStringUrl(
|
||||
'https://github.com/login/oauth/authorize?client_id=$clientId&redirect_uri=gittouch://login&scope=$scope&state=$_oauthState',
|
||||
);
|
||||
}
|
||||
|
|
|
@ -259,7 +259,7 @@ class ThemeModel with ChangeNotifier {
|
|||
replace: replace,
|
||||
);
|
||||
} else {
|
||||
launchUrl(url);
|
||||
launchStringUrl(url);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ class _User extends StatelessWidget {
|
|||
leftIconData: Octicons.location,
|
||||
text: Text(p!.location!),
|
||||
onTap: () {
|
||||
launchUrl('https://www.google.com/maps/place/' +
|
||||
launchStringUrl('https://www.google.com/maps/place/' +
|
||||
p!.location!.replaceAll(RegExp(r'\s+'), ''));
|
||||
},
|
||||
),
|
||||
|
@ -158,7 +158,7 @@ class _User extends StatelessWidget {
|
|||
leftIconData: Octicons.mail,
|
||||
text: Text(p!.email),
|
||||
onTap: () {
|
||||
launchUrl('mailto:' + p!.email);
|
||||
launchStringUrl('mailto:' + p!.email);
|
||||
},
|
||||
),
|
||||
if (isNotNullOrEmpty(p!.websiteUrl))
|
||||
|
@ -170,7 +170,7 @@ class _User extends StatelessWidget {
|
|||
if (!url.startsWith('http')) {
|
||||
url = 'http://$url';
|
||||
}
|
||||
launchUrl(url);
|
||||
launchStringUrl(url);
|
||||
},
|
||||
),
|
||||
],
|
||||
|
@ -227,7 +227,7 @@ class _Org extends StatelessWidget {
|
|||
leftIconData: Octicons.location,
|
||||
text: Text(p!.location!),
|
||||
onTap: () {
|
||||
launchUrl('https://www.google.com/maps/place/' +
|
||||
launchStringUrl('https://www.google.com/maps/place/' +
|
||||
p!.location!.replaceAll(RegExp(r'\s+'), ''));
|
||||
},
|
||||
),
|
||||
|
@ -236,7 +236,7 @@ class _Org extends StatelessWidget {
|
|||
leftIconData: Octicons.mail,
|
||||
text: Text(p!.email!),
|
||||
onTap: () {
|
||||
launchUrl('mailto:' + p!.email!);
|
||||
launchStringUrl('mailto:' + p!.email!);
|
||||
},
|
||||
),
|
||||
if (isNotNullOrEmpty(p!.websiteUrl))
|
||||
|
@ -248,7 +248,7 @@ class _Org extends StatelessWidget {
|
|||
if (!url.startsWith('http')) {
|
||||
url = 'http://$url';
|
||||
}
|
||||
launchUrl(url);
|
||||
launchStringUrl(url);
|
||||
},
|
||||
),
|
||||
],
|
||||
|
|
|
@ -167,7 +167,7 @@ class PrimerBranchName extends StatelessWidget {
|
|||
}
|
||||
}
|
||||
|
||||
launchUrl(String? url) async {
|
||||
launchStringUrl(String? url) async {
|
||||
if (url == null) return;
|
||||
|
||||
if (await canLaunch(url)) {
|
||||
|
|
|
@ -33,7 +33,7 @@ class ActionItem {
|
|||
text: 'Open in Browser',
|
||||
iconData: Octicons.globe,
|
||||
onTap: (_) {
|
||||
launchUrl(url);
|
||||
launchStringUrl(url);
|
||||
},
|
||||
),
|
||||
];
|
||||
|
|
|
@ -67,7 +67,7 @@ class _HtmlViewState extends State<HtmlView> {
|
|||
},
|
||||
navigationDelegate: (request) {
|
||||
if (loaded) {
|
||||
launchUrl(request.url); // TODO:
|
||||
launchStringUrl(request.url); // TODO:
|
||||
return NavigationDecision.prevent;
|
||||
} else {
|
||||
loaded = true;
|
||||
|
|
|
@ -155,7 +155,7 @@ class MarkdownFlutterView extends StatelessWidget {
|
|||
}
|
||||
}
|
||||
|
||||
launchUrl(url);
|
||||
launchStringUrl(url);
|
||||
},
|
||||
styleSheet: MarkdownStyleSheet(
|
||||
a: _basicStyle.copyWith(color: theme.palette.primary),
|
||||
|
|
18
pubspec.lock
18
pubspec.lock
|
@ -970,7 +970,21 @@ packages:
|
|||
name: url_launcher
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "6.0.9"
|
||||
version: "6.1.3"
|
||||
url_launcher_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_android
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "6.0.17"
|
||||
url_launcher_ios:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_ios
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "6.0.17"
|
||||
url_launcher_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -1071,4 +1085,4 @@ packages:
|
|||
version: "3.1.0"
|
||||
sdks:
|
||||
dart: ">=2.17.5 <3.0.0"
|
||||
flutter: ">=2.0.0"
|
||||
flutter: ">=2.8.0"
|
||||
|
|
Loading…
Reference in New Issue