|
@@ -61,7 +61,7 @@ class UpgradeDialog extends StatelessWidget {
|
61
|
61
|
void installApk(String path) async {
|
62
|
62
|
bool success = await UpgradeService.installApk(path);
|
63
|
63
|
if (success) {
|
64
|
|
- dismiss();
|
|
64
|
+ // dismiss();
|
65
|
65
|
} else {
|
66
|
66
|
progress.value = -1;
|
67
|
67
|
}
|
|
@@ -79,24 +79,27 @@ class UpgradeDialog extends StatelessWidget {
|
79
|
79
|
child: Column(
|
80
|
80
|
mainAxisSize: MainAxisSize.min,
|
81
|
81
|
children: [
|
82
|
|
- Row(
|
83
|
|
- children: [
|
84
|
|
- Text(
|
85
|
|
- '发现新版本 $versionName',
|
86
|
|
- style: const TextStyle(color: Color(0xFF333333), fontSize: 16, fontWeight: FontWeight.w500),
|
87
|
|
- ),
|
88
|
|
- const Spacer(),
|
89
|
|
- progress.builder((v) => v == -1
|
90
|
|
- ? GestureDetector(
|
91
|
|
- onTap: dismiss,
|
92
|
|
- child: const Text(
|
93
|
|
- '取消',
|
94
|
|
- style: TextStyle(color: Color(0xFF333333), fontSize: 14),
|
95
|
|
- ),
|
96
|
|
- )
|
97
|
|
- : const SizedBox.shrink()),
|
98
|
|
- ],
|
|
82
|
+ Container(
|
|
83
|
+ alignment: Alignment.topLeft,
|
|
84
|
+ child: Text(
|
|
85
|
+ '发现新版本 $versionName',
|
|
86
|
+ style: const TextStyle(color: Color(0xFF333333), fontSize: 16, fontWeight: FontWeight.w500),
|
|
87
|
+ ),
|
99
|
88
|
),
|
|
89
|
+ // Row(
|
|
90
|
+ // children: [
|
|
91
|
+ // const Spacer(),
|
|
92
|
+ // progress.builder((v) => v == -1
|
|
93
|
+ // ? GestureDetector(
|
|
94
|
+ // onTap: dismiss,
|
|
95
|
+ // child: const Text(
|
|
96
|
+ // '取消',
|
|
97
|
+ // style: TextStyle(color: Color(0xFF333333), fontSize: 14),
|
|
98
|
+ // ),
|
|
99
|
+ // )
|
|
100
|
+ // : const SizedBox.shrink()),
|
|
101
|
+ // ],
|
|
102
|
+ // ),
|
100
|
103
|
const SizedBox(height: 24),
|
101
|
104
|
progress.builder((v) => v == -1 ? MyButton('立即下载安装', onTap: onDownload, alignment: null) : buildProgress(v)),
|
102
|
105
|
],
|