upgrade & opt

- flutter 3.0.1
- show snackbar when no server to ping
- server detail page replace nice to iowait
- make script show stdout when error
This commit is contained in:
Junyuan Feng
2022-05-21 20:39:52 +08:00
parent b4d42eecf3
commit 228f228d44
14 changed files with 53 additions and 23 deletions

View File

@@ -21,6 +21,7 @@ class _PingPageState extends State<PingPage>
late TextEditingController _textEditingController;
late MediaQueryData _media;
final List<PingResult> _results = [];
final _serverProvider = locator<ServerProvider>();
late S s;
static const summaryTextStyle = TextStyle(
fontSize: 12,
@@ -106,7 +107,12 @@ class _PingPageState extends State<PingPage>
return;
}
await Future.wait(locator<ServerProvider>().servers.map((e) async {
if (_serverProvider.servers.isEmpty) {
showSnackBar(context, Text(s.pingNoServer));
return;
}
await Future.wait(_serverProvider.servers.map((e) async {
if (e.client == null) {
return;
}