More use of url_launcher plugin in Flutter Gallery (#9836)

This commit is contained in:
Sarah Zakarias 2017-05-09 15:05:23 +02:00 committed by GitHub
parent 76dbfe9a38
commit ee6cd679c8

View File

@ -6,7 +6,8 @@ import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:url_launcher/url_launcher.dart';
typedef Future<String> UpdateUrlFetcher();
@ -42,7 +43,7 @@ class UpdaterState extends State<Updater> {
if (updateUrl != null) {
final bool wantsUpdate = await showDialog(context: context, child: _buildDialog());
if (wantsUpdate != null && wantsUpdate)
UrlLauncher.launch(updateUrl);
launch(updateUrl);
}
}