1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00

Add unawaited_futures (#1148)

This commit is contained in:
Brett Morgan
2022-04-27 09:24:19 +10:00
committed by GitHub
parent 802026f4ea
commit f998c9577e
12 changed files with 26 additions and 23 deletions

View File

@@ -167,7 +167,7 @@ class Contents extends StatelessWidget {
// a browser.
final url = Uri.parse('https://flutter.dev/docs');
if (await launcher.canLaunchUrl(url)) {
launcher.launchUrl(url);
await launcher.launchUrl(url);
}
},
child: const Text('Open Flutter Docs'),

View File

@@ -97,7 +97,7 @@ class _MyHomePageState extends State<MyHomePage> {
// a browser.
final url = Uri.parse('https://flutter.dev/docs');
if (await launcher.canLaunchUrl(url)) {
launcher.launchUrl(url);
await launcher.launchUrl(url);
}
},
child: const Text('Open Flutter Docs'),

View File

@@ -166,7 +166,7 @@ class Contents extends StatelessWidget {
// a browser.
final url = Uri.parse('https://flutter.dev/docs');
if (await launcher.canLaunchUrl(url)) {
launcher.launchUrl(url);
await launcher.launchUrl(url);
}
},
child: const Text('Open Flutter Docs'),