App更新优化

This commit is contained in:
LollipopKit
2021-09-18 20:23:28 +08:00
parent b4d44c41e5
commit f457c7caee
3 changed files with 46 additions and 40 deletions

View File

@@ -38,7 +38,9 @@ Future<void> doUpdate(BuildContext context, {bool force = false}) async {
showSnackBarWithAction( showSnackBarWithAction(
context, context,
'${BuildData.name}有更新啦Ver${update.newest}\n${update.changelog}', update.min > BuildData.build
? '您的版本过旧,请及时更新'
: '${BuildData.name}有更新啦Ver${update.newest}\n${update.changelog}',
'更新', '更新',
() => openUrl(Platform.isAndroid ? update.android : update.ios)); () => openUrl(Platform.isAndroid ? update.android : update.ios));
} }

View File

@@ -184,7 +184,11 @@ class _ServerPageState extends State<ServerPage>
keyController.text = auth['privateKey']; keyController.text = auth['privateKey'];
} }
showRoundDialog(context, '修改服务器信息', _buildTextInputField(context), [ showRoundDialog(
context,
'修改服务器信息',
_buildTextInputField(context),
[
TextButton( TextButton(
onPressed: () { onPressed: () {
clearTextField(); clearTextField();
@@ -221,7 +225,8 @@ class _ServerPageState extends State<ServerPage>
'删除', '删除',
style: TextStyle(color: Colors.red), style: TextStyle(color: Colors.red),
)) ))
], barrierDismiss: false); ],
barrierDismiss: false);
}); });
} }

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env dart #!/usr/bin/env dart
// ignore_for_file: avoid_print // ignore_for_file: avoid_print
import 'dart:convert'; import 'dart:convert';