mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
More use of url_launcher plugin in Flutter Gallery (#9836)
This commit is contained in:
parent
76dbfe9a38
commit
ee6cd679c8
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user