mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 15:24:35 +01:00
小优化
This commit is contained in:
@@ -40,14 +40,7 @@ class ServerProvider extends BusyProvider {
|
||||
}
|
||||
|
||||
ServerInfo genInfo(ServerPrivateInfo spi) {
|
||||
return ServerInfo(
|
||||
spi,
|
||||
emptyStatus,
|
||||
SSHClient(
|
||||
host: spi.ip!,
|
||||
port: spi.port!,
|
||||
username: spi.user!,
|
||||
passwordOrKey: spi.authorization));
|
||||
return ServerInfo(spi, emptyStatus, genClient(spi));
|
||||
}
|
||||
|
||||
SSHClient genClient(ServerPrivateInfo spi) {
|
||||
@@ -97,7 +90,8 @@ class ServerProvider extends BusyProvider {
|
||||
|
||||
Future<ServerStatus> _getData(ServerPrivateInfo info, int idx) async {
|
||||
final client = _servers[idx].client;
|
||||
if (!(await client.isConnected())) {
|
||||
final connected = await client.isConnected();
|
||||
if (!connected) {
|
||||
await client.connect();
|
||||
}
|
||||
final cpu = await client.execute(
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
|
||||
class BuildData {
|
||||
static const String name = "ToolBox";
|
||||
static const int build = 10;
|
||||
static const String engine =
|
||||
"Flutter 2.5.0 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision 4cc385b4b8 (10 days ago) • 2021-09-07 23:01:49 -0700\nEngine • revision f0826da7ef\nTools • Dart 2.14.0\n";
|
||||
static const String buildAt = "2021-09-18 17:25:30.528659";
|
||||
static const int modifications = 9;
|
||||
static const int build = 15;
|
||||
static const String engine = "Flutter 2.5.1 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision ffb2ecea52 (2 weeks ago) • 2021-09-17 15:26:33 -0400\nEngine • revision b3af521a05\nTools • Dart 2.14.2\n";
|
||||
static const String buildAt = "2021-10-02 19:52:07.676336";
|
||||
static const int modifications = 71;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user