Add an option to retry a failed download
This commit is contained in:
parent
1cba327147
commit
81c8ae65ca
|
@ -141,12 +141,12 @@ class _ApkDownloaderDialogState extends State<ApkDownloaderDialog> {
|
|||
} catch (e) {
|
||||
Logger("ApkDownloader").severe(e);
|
||||
AlertDialog alert = AlertDialog(
|
||||
title: Text("download failed"),
|
||||
content: Text("we could not complete the download, please retry later"),
|
||||
title: Text("sorry"),
|
||||
content: Text("the download could not be completed"),
|
||||
actions: [
|
||||
TextButton(
|
||||
child: Text(
|
||||
"ok",
|
||||
"ignore",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
),
|
||||
|
@ -156,6 +156,25 @@ class _ApkDownloaderDialogState extends State<ApkDownloaderDialog> {
|
|||
Navigator.of(context, rootNavigator: true).pop('dialog');
|
||||
},
|
||||
),
|
||||
TextButton(
|
||||
child: Text(
|
||||
"retry",
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).buttonColor,
|
||||
),
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context, rootNavigator: true).pop('dialog');
|
||||
Navigator.of(context, rootNavigator: true).pop('dialog');
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return ApkDownloaderDialog(widget.versionInfo);
|
||||
},
|
||||
barrierDismissible: false,
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue