mirror of
https://github.com/flutter/samples.git
synced 2026-07-08 18:13:21 +00:00
Update for url_launcher API change (#1144)
This commit is contained in:
@@ -29,9 +29,10 @@ class PolicyDialog extends StatelessWidget {
|
||||
fontWeight: FontWeight.bold, color: Colors.lightBlue),
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () async {
|
||||
const url = 'https://policies.google.com/terms';
|
||||
if (await url_launcher.canLaunch(url)) {
|
||||
await url_launcher.launch(url);
|
||||
final url =
|
||||
Uri.parse('https://policies.google.com/terms');
|
||||
if (await url_launcher.canLaunchUrl(url)) {
|
||||
await url_launcher.launchUrl(url);
|
||||
}
|
||||
},
|
||||
)
|
||||
@@ -50,9 +51,9 @@ class PolicyDialog extends StatelessWidget {
|
||||
fontWeight: FontWeight.bold, color: Colors.lightBlue),
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () async {
|
||||
const url = 'https://unsplash.com/terms';
|
||||
if (await url_launcher.canLaunch(url)) {
|
||||
await url_launcher.launch(url);
|
||||
final url = Uri.parse('https://unsplash.com/terms');
|
||||
if (await url_launcher.canLaunchUrl(url)) {
|
||||
await url_launcher.launchUrl(url);
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user