mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
Optimzed & Flutter 3.3.4
This commit is contained in:
4
.fvm/fvm_config.json
Normal file
4
.fvm/fvm_config.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"flutterSdkVersion": "3.3.4",
|
||||||
|
"flavors": {}
|
||||||
|
}
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -48,3 +48,4 @@ app.*.map.json
|
|||||||
/android/app/fjy.androidstudio.key
|
/android/app/fjy.androidstudio.key
|
||||||
/release
|
/release
|
||||||
test.dart
|
test.dart
|
||||||
|
.fvm/flutter_sdk
|
||||||
9
.vscode/settings.json
vendored
Normal file
9
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"dart.flutterSdkPath": ".fvm/flutter_sdk",
|
||||||
|
"search.exclude": {
|
||||||
|
"**/.fvm": true
|
||||||
|
},
|
||||||
|
"files.watcherExclude": {
|
||||||
|
"**/.fvm": true
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@@ -21,6 +21,6 @@
|
|||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1.0</string>
|
<string>1.0</string>
|
||||||
<key>MinimumOSVersion</key>
|
<key>MinimumOSVersion</key>
|
||||||
<string>9.0</string>
|
<string>11.0</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Uncomment this line to define a global platform for your project
|
# Uncomment this line to define a global platform for your project
|
||||||
# platform :ios, '9.0'
|
# platform :ios, '11.0'
|
||||||
|
|
||||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||||
|
|||||||
@@ -40,13 +40,13 @@ EXTERNAL SOURCES:
|
|||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
countly_flutter: e245f94349d8adf306c22e60c10648c69aae7380
|
countly_flutter: e245f94349d8adf306c22e60c10648c69aae7380
|
||||||
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
|
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
||||||
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
|
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
|
||||||
path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
|
path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
|
||||||
r_upgrade: 44d715c61914cce3d01ea225abffe894fd51c114
|
r_upgrade: 44d715c61914cce3d01ea225abffe894fd51c114
|
||||||
share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68
|
share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68
|
||||||
url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de
|
url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de
|
||||||
|
|
||||||
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
|
PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3
|
||||||
|
|
||||||
COCOAPODS: 1.11.3
|
COCOAPODS: 1.11.3
|
||||||
|
|||||||
@@ -339,7 +339,7 @@
|
|||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SUPPORTED_PLATFORMS = iphoneos;
|
SUPPORTED_PLATFORMS = iphoneos;
|
||||||
@@ -418,7 +418,7 @@
|
|||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = YES;
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
@@ -467,7 +467,7 @@
|
|||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SUPPORTED_PLATFORMS = iphoneos;
|
SUPPORTED_PLATFORMS = iphoneos;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -39,9 +39,9 @@ class NetSpeed {
|
|||||||
String speedOut({String? device}) {
|
String speedOut({String? device}) {
|
||||||
if (old[0].device == '' || now[0].device == '') return '0kb/s';
|
if (old[0].device == '' || now[0].device == '') return '0kb/s';
|
||||||
final idx = deviceIdx(device);
|
final idx = deviceIdx(device);
|
||||||
final speedInBytesPerSecond =
|
final speedOutBytesPerSecond =
|
||||||
(now[idx].bytesOut - old[idx].bytesOut) / timeDiff;
|
(now[idx].bytesOut - old[idx].bytesOut) / timeDiff;
|
||||||
return buildStandardOutput(speedInBytesPerSecond);
|
return buildStandardOutput(speedOutBytesPerSecond);
|
||||||
}
|
}
|
||||||
|
|
||||||
int deviceIdx(String? device) {
|
int deviceIdx(String? device) {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import 'package:dartssh2/dartssh2.dart';
|
import 'package:dartssh2/dartssh2.dart';
|
||||||
import 'package:toolbox/data/model/server/server_connection_state.dart';
|
|
||||||
import 'package:toolbox/data/model/server/server_private_info.dart';
|
import 'package:toolbox/data/model/server/server_private_info.dart';
|
||||||
import 'package:toolbox/data/model/server/server_status.dart';
|
import 'package:toolbox/data/model/server/server_status.dart';
|
||||||
|
|
||||||
@@ -11,3 +10,5 @@ class ServerInfo {
|
|||||||
|
|
||||||
ServerInfo(this.info, this.status, this.client, this.connectionState);
|
ServerInfo(this.info, this.status, this.client, this.connectionState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum ServerConnectionState { disconnected, connecting, connected, failed }
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
enum ServerConnectionState { disconnected, connecting, connected, failed }
|
|
||||||
@@ -10,7 +10,6 @@ import 'package:toolbox/data/model/server/cpu_2_status.dart';
|
|||||||
import 'package:toolbox/data/model/server/cpu_status.dart';
|
import 'package:toolbox/data/model/server/cpu_status.dart';
|
||||||
import 'package:toolbox/data/model/server/memory.dart';
|
import 'package:toolbox/data/model/server/memory.dart';
|
||||||
import 'package:toolbox/data/model/server/net_speed.dart';
|
import 'package:toolbox/data/model/server/net_speed.dart';
|
||||||
import 'package:toolbox/data/model/server/server_connection_state.dart';
|
|
||||||
import 'package:toolbox/data/model/server/disk_info.dart';
|
import 'package:toolbox/data/model/server/disk_info.dart';
|
||||||
import 'package:toolbox/data/model/server/server.dart';
|
import 'package:toolbox/data/model/server/server.dart';
|
||||||
import 'package:toolbox/data/model/server/server_private_info.dart';
|
import 'package:toolbox/data/model/server/server_private_info.dart';
|
||||||
@@ -229,23 +228,9 @@ class ServerProvider extends BusyProvider {
|
|||||||
/// lo: 45929941 269112 0 0 0 0 0 0 45929941 269112 0 0 0 0 0 0
|
/// lo: 45929941 269112 0 0 0 0 0 0 45929941 269112 0 0 0 0 0 0
|
||||||
/// eth0: 48481023 505772 0 0 0 0 0 0 36002262 202307 0 0 0 0 0 0
|
/// eth0: 48481023 505772 0 0 0 0 0 0 36002262 202307 0 0 0 0 0 0
|
||||||
/// 1635752901
|
/// 1635752901
|
||||||
void _getNetSpeed(ServerPrivateInfo spi, String raw) {
|
Future<void> _getNetSpeed(ServerPrivateInfo spi, String raw) async {
|
||||||
final info = _servers.firstWhere((e) => e.info == spi);
|
final info = _servers.firstWhere((e) => e.info == spi);
|
||||||
final split = raw.split('\n');
|
info.status.netSpeed.update(await compute(_parseNetSpeed, raw));
|
||||||
final deviceCount = split.length - 3;
|
|
||||||
if (deviceCount < 1) return;
|
|
||||||
final time = int.parse(split[split.length - 1]);
|
|
||||||
final results = <NetSpeedPart>[];
|
|
||||||
for (int idx = 2; idx < deviceCount; idx++) {
|
|
||||||
final data = split[idx].trim().split(':');
|
|
||||||
final device = data.first;
|
|
||||||
final bytes = data.last.trim().split(' ');
|
|
||||||
bytes.removeWhere((element) => element == '');
|
|
||||||
final bytesIn = int.parse(bytes.first);
|
|
||||||
final bytesOut = int.parse(bytes[8]);
|
|
||||||
results.add(NetSpeedPart(device, bytesIn, bytesOut, time));
|
|
||||||
}
|
|
||||||
info.status.netSpeed.update(results);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _getSysVer(ServerPrivateInfo spi, String raw) {
|
void _getSysVer(ServerPrivateInfo spi, String raw) {
|
||||||
@@ -256,51 +241,14 @@ class ServerProvider extends BusyProvider {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String _getCPUTemp(String type, String value) {
|
Future<void> _getCPU(ServerPrivateInfo spi, String raw, String tempType,
|
||||||
const noMatch = "/sys/class/thermal/thermal_zone*/type";
|
String tempValue) async {
|
||||||
// Not support to get CPU temperature
|
|
||||||
if (value.contains(noMatch) ||
|
|
||||||
type.contains(noMatch) ||
|
|
||||||
value.isEmpty ||
|
|
||||||
type.isEmpty) {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
final split = type.split('\n');
|
|
||||||
int idx = 0;
|
|
||||||
for (var item in split) {
|
|
||||||
if (item.contains(cpuTempReg)) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
idx++;
|
|
||||||
}
|
|
||||||
final valueSplited = value.split('\n');
|
|
||||||
if (idx >= valueSplited.length) return '';
|
|
||||||
final temp = int.tryParse(valueSplited[idx].trim());
|
|
||||||
if (temp == null) return '';
|
|
||||||
return '${(temp / 1000).toStringAsFixed(1)}°C';
|
|
||||||
}
|
|
||||||
|
|
||||||
void _getCPU(
|
|
||||||
ServerPrivateInfo spi, String raw, String tempType, String tempValue) {
|
|
||||||
final info = _servers.firstWhere((e) => e.info == spi);
|
final info = _servers.firstWhere((e) => e.info == spi);
|
||||||
final List<CpuStatus> cpus = [];
|
final cpus = await compute(_parseCPU, raw);
|
||||||
|
|
||||||
for (var item in raw.split('\n')) {
|
|
||||||
if (item == '') break;
|
|
||||||
final id = item.split(' ').first;
|
|
||||||
final matches = item.replaceFirst(id, '').trim().split(' ');
|
|
||||||
cpus.add(CpuStatus(
|
|
||||||
id,
|
|
||||||
int.parse(matches[0]),
|
|
||||||
int.parse(matches[1]),
|
|
||||||
int.parse(matches[2]),
|
|
||||||
int.parse(matches[3]),
|
|
||||||
int.parse(matches[4]),
|
|
||||||
int.parse(matches[5]),
|
|
||||||
int.parse(matches[6])));
|
|
||||||
}
|
|
||||||
if (cpus.isNotEmpty) {
|
if (cpus.isNotEmpty) {
|
||||||
info.status.cpu2Status.update(cpus, _getCPUTemp(tempType, tempValue));
|
info.status.cpu2Status
|
||||||
|
.update(cpus, await compute(_getCPUTemp, [tempType, tempValue]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -309,14 +257,11 @@ class ServerProvider extends BusyProvider {
|
|||||||
raw.split('up ')[1].split(', ')[0];
|
raw.split('up ')[1].split(', ')[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
void _getTcp(ServerPrivateInfo spi, String raw) {
|
Future<void> _getTcp(ServerPrivateInfo spi, String raw) async {
|
||||||
final info = _servers.firstWhere((e) => e.info == spi);
|
final info = _servers.firstWhere((e) => e.info == spi);
|
||||||
final lines = raw.split('\n');
|
final status = await compute(_parseTcp, raw);
|
||||||
final idx = lines.lastWhere((element) => element.startsWith('Tcp:'),
|
if (status != null) {
|
||||||
orElse: () => '');
|
info.status.tcp = status;
|
||||||
if (idx != '') {
|
|
||||||
final vals = idx.split(numReg);
|
|
||||||
info.status.tcp = TcpStatus(vals[5].i, vals[6].i, vals[7].i, vals[8].i);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -335,24 +280,10 @@ class ServerProvider extends BusyProvider {
|
|||||||
info.status.disk = list;
|
info.status.disk = list;
|
||||||
}
|
}
|
||||||
|
|
||||||
void _getMem(ServerPrivateInfo spi, String raw) {
|
Future<void> _getMem(ServerPrivateInfo spi, String raw) async {
|
||||||
final info = _servers.firstWhere((e) => e.info == spi);
|
final info = _servers.firstWhere((e) => e.info == spi);
|
||||||
final items = raw.split('\n').map((e) => memItemReg.firstMatch(e)).toList();
|
final mem = await compute(_parseMem, raw);
|
||||||
final total = int.parse(
|
info.status.memory = mem;
|
||||||
items.firstWhere((e) => e?.group(1) == 'MemTotal:')?.group(2) ?? '1');
|
|
||||||
final free = int.parse(
|
|
||||||
items.firstWhere((e) => e?.group(1) == 'MemFree:')?.group(2) ?? '0');
|
|
||||||
final cached = int.parse(
|
|
||||||
items.firstWhere((e) => e?.group(1) == 'Cached:')?.group(2) ?? '0');
|
|
||||||
final available = int.parse(
|
|
||||||
items.firstWhere((e) => e?.group(1) == 'MemAvailable:')?.group(2) ??
|
|
||||||
'0');
|
|
||||||
info.status.memory = Memory(
|
|
||||||
total: total,
|
|
||||||
used: total - available,
|
|
||||||
free: free,
|
|
||||||
cache: cached,
|
|
||||||
avail: available);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<String?> runSnippet(ServerPrivateInfo spi, Snippet snippet) async {
|
Future<String?> runSnippet(ServerPrivateInfo spi, Snippet snippet) async {
|
||||||
@@ -363,3 +294,96 @@ class ServerProvider extends BusyProvider {
|
|||||||
.string;
|
.string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Memory _parseMem(String raw) {
|
||||||
|
final items = raw.split('\n').map((e) => memItemReg.firstMatch(e)).toList();
|
||||||
|
final total = int.parse(
|
||||||
|
items.firstWhere((e) => e?.group(1) == 'MemTotal:')?.group(2) ?? '1');
|
||||||
|
final free = int.parse(
|
||||||
|
items.firstWhere((e) => e?.group(1) == 'MemFree:')?.group(2) ?? '0');
|
||||||
|
final cached = int.parse(
|
||||||
|
items.firstWhere((e) => e?.group(1) == 'Cached:')?.group(2) ?? '0');
|
||||||
|
final available = int.parse(
|
||||||
|
items.firstWhere((e) => e?.group(1) == 'MemAvailable:')?.group(2) ?? '0');
|
||||||
|
return Memory(
|
||||||
|
total: total,
|
||||||
|
used: total - available,
|
||||||
|
free: free,
|
||||||
|
cache: cached,
|
||||||
|
avail: available);
|
||||||
|
}
|
||||||
|
|
||||||
|
TcpStatus? _parseTcp(String raw) {
|
||||||
|
final lines = raw.split('\n');
|
||||||
|
final idx = lines.lastWhere((element) => element.startsWith('Tcp:'),
|
||||||
|
orElse: () => '');
|
||||||
|
if (idx != '') {
|
||||||
|
final vals = idx.split(numReg);
|
||||||
|
return TcpStatus(vals[5].i, vals[6].i, vals[7].i, vals[8].i);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<CpuStatus> _parseCPU(String raw) {
|
||||||
|
final List<CpuStatus> cpus = [];
|
||||||
|
|
||||||
|
for (var item in raw.split('\n')) {
|
||||||
|
if (item == '') break;
|
||||||
|
final id = item.split(' ').first;
|
||||||
|
final matches = item.replaceFirst(id, '').trim().split(' ');
|
||||||
|
cpus.add(CpuStatus(
|
||||||
|
id,
|
||||||
|
int.parse(matches[0]),
|
||||||
|
int.parse(matches[1]),
|
||||||
|
int.parse(matches[2]),
|
||||||
|
int.parse(matches[3]),
|
||||||
|
int.parse(matches[4]),
|
||||||
|
int.parse(matches[5]),
|
||||||
|
int.parse(matches[6])));
|
||||||
|
}
|
||||||
|
return cpus;
|
||||||
|
}
|
||||||
|
|
||||||
|
String _getCPUTemp(List<String> segments) {
|
||||||
|
const noMatch = "/sys/class/thermal/thermal_zone*/type";
|
||||||
|
final type = segments[0];
|
||||||
|
final value = segments[1];
|
||||||
|
// Not support to get CPU temperature
|
||||||
|
if (value.contains(noMatch) ||
|
||||||
|
type.contains(noMatch) ||
|
||||||
|
value.isEmpty ||
|
||||||
|
type.isEmpty) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
final split = type.split('\n');
|
||||||
|
int idx = 0;
|
||||||
|
for (var item in split) {
|
||||||
|
if (item.contains(cpuTempReg)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
idx++;
|
||||||
|
}
|
||||||
|
final valueSplited = value.split('\n');
|
||||||
|
if (idx >= valueSplited.length) return '';
|
||||||
|
final temp = int.tryParse(valueSplited[idx].trim());
|
||||||
|
if (temp == null) return '';
|
||||||
|
return '${(temp / 1000).toStringAsFixed(1)}°C';
|
||||||
|
}
|
||||||
|
|
||||||
|
List<NetSpeedPart> _parseNetSpeed(String raw) {
|
||||||
|
final split = raw.split('\n');
|
||||||
|
final deviceCount = split.length - 3;
|
||||||
|
if (deviceCount < 1) return [];
|
||||||
|
final time = int.parse(split[split.length - 1]);
|
||||||
|
final results = <NetSpeedPart>[];
|
||||||
|
for (int idx = 2; idx < deviceCount; idx++) {
|
||||||
|
final data = split[idx].trim().split(':');
|
||||||
|
final device = data.first;
|
||||||
|
final bytes = data.last.trim().split(' ');
|
||||||
|
bytes.removeWhere((element) => element == '');
|
||||||
|
final bytesIn = int.parse(bytes.first);
|
||||||
|
final bytesOut = int.parse(bytes[8]);
|
||||||
|
results.add(NetSpeedPart(device, bytesIn, bytesOut, time));
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
class BuildData {
|
class BuildData {
|
||||||
static const String name = "ServerBox";
|
static const String name = "ServerBox";
|
||||||
static const int build = 153;
|
static const int build = 154;
|
||||||
static const String engine =
|
static const String engine =
|
||||||
"Flutter 3.0.1 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision fb57da5f94 (12 days ago) • 2022-05-19 15:50:29 -0700\nEngine • revision caaafc5604\nTools • Dart 2.17.1 • DevTools 2.12.2\n";
|
"Flutter 3.3.4 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision eb6d86ee27 (2 weeks ago) • 2022-10-04 22:31:45 -0700\nEngine • revision c08d7d5efc\nTools • Dart 2.18.2 • DevTools 2.15.0\n";
|
||||||
static const String buildAt = "2022-05-31 22:16:25.670160";
|
static const String buildAt = "2022-10-21 17:29:42.809139";
|
||||||
static const int modifications = 1;
|
static const int modifications = 9;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ class _PrivateKeyEditPageState extends State<PrivateKeyEditPage>
|
|||||||
tooltip: s.save,
|
tooltip: s.save,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
final name = nameController.text;
|
final name = nameController.text;
|
||||||
final key = keyController.text;
|
final key = keyController.text.trim();
|
||||||
final pwd = pwdController.text;
|
final pwd = pwdController.text;
|
||||||
if (name.isEmpty || key.isEmpty) {
|
if (name.isEmpty || key.isEmpty) {
|
||||||
showSnackBar(context, Text(s.fieldMustNotEmpty));
|
showSnackBar(context, Text(s.fieldMustNotEmpty));
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import 'package:toolbox/core/route.dart';
|
|||||||
import 'package:toolbox/core/utils.dart';
|
import 'package:toolbox/core/utils.dart';
|
||||||
import 'package:toolbox/data/model/app/menu_item.dart';
|
import 'package:toolbox/data/model/app/menu_item.dart';
|
||||||
import 'package:toolbox/data/model/server/server.dart';
|
import 'package:toolbox/data/model/server/server.dart';
|
||||||
import 'package:toolbox/data/model/server/server_connection_state.dart';
|
|
||||||
import 'package:toolbox/data/model/server/server_private_info.dart';
|
import 'package:toolbox/data/model/server/server_private_info.dart';
|
||||||
import 'package:toolbox/data/model/server/server_status.dart';
|
import 'package:toolbox/data/model/server/server_status.dart';
|
||||||
import 'package:toolbox/data/provider/server.dart';
|
import 'package:toolbox/data/provider/server.dart';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import 'package:toolbox/core/extension/numx.dart';
|
|||||||
import 'package:toolbox/core/extension/stringx.dart';
|
import 'package:toolbox/core/extension/stringx.dart';
|
||||||
import 'package:toolbox/core/route.dart';
|
import 'package:toolbox/core/route.dart';
|
||||||
import 'package:toolbox/core/utils.dart';
|
import 'package:toolbox/core/utils.dart';
|
||||||
import 'package:toolbox/data/model/server/server_connection_state.dart';
|
import 'package:toolbox/data/model/server/server.dart';
|
||||||
import 'package:toolbox/data/model/server/server_private_info.dart';
|
import 'package:toolbox/data/model/server/server_private_info.dart';
|
||||||
import 'package:toolbox/data/model/sftp/absolute_path.dart';
|
import 'package:toolbox/data/model/sftp/absolute_path.dart';
|
||||||
import 'package:toolbox/data/model/sftp/download_worker.dart';
|
import 'package:toolbox/data/model/sftp/download_worker.dart';
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ EXTERNAL SOURCES:
|
|||||||
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424
|
FlutterMacOS: ae6af50a8ea7d6103d888583d46bd8328a7e9811
|
||||||
path_provider_macos: 3c0c3b4b0d4a76d2bf989a913c2de869c5641a19
|
path_provider_macos: 3c0c3b4b0d4a76d2bf989a913c2de869c5641a19
|
||||||
share_plus_macos: 853ee48e7dce06b633998ca0735d482dd671ade4
|
share_plus_macos: 853ee48e7dce06b633998ca0735d482dd671ade4
|
||||||
url_launcher_macos: 597e05b8e514239626bcf4a850fcf9ef5c856ec3
|
url_launcher_macos: 597e05b8e514239626bcf4a850fcf9ef5c856ec3
|
||||||
|
|||||||
31
pubspec.lock
31
pubspec.lock
@@ -35,7 +35,7 @@ packages:
|
|||||||
name: async
|
name: async
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.8.2"
|
version: "2.9.0"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -49,14 +49,7 @@ packages:
|
|||||||
name: characters
|
name: characters
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.2.1"
|
||||||
charcode:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: charcode
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "1.3.1"
|
|
||||||
circle_chart:
|
circle_chart:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -79,7 +72,7 @@ packages:
|
|||||||
name: clock
|
name: clock
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.1"
|
||||||
collection:
|
collection:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -165,7 +158,7 @@ packages:
|
|||||||
name: fake_async
|
name: fake_async
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0"
|
version: "1.3.1"
|
||||||
ffi:
|
ffi:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -325,21 +318,21 @@ packages:
|
|||||||
name: matcher
|
name: matcher
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.11"
|
version: "0.12.12"
|
||||||
material_color_utilities:
|
material_color_utilities:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: material_color_utilities
|
name: material_color_utilities
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.4"
|
version: "0.1.5"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.7.0"
|
version: "1.8.0"
|
||||||
mime:
|
mime:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -360,7 +353,7 @@ packages:
|
|||||||
name: path
|
name: path
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.1"
|
version: "1.8.2"
|
||||||
path_provider:
|
path_provider:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -533,7 +526,7 @@ packages:
|
|||||||
name: source_span
|
name: source_span
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.2"
|
version: "1.9.0"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -554,21 +547,21 @@ packages:
|
|||||||
name: string_scanner
|
name: string_scanner
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.1"
|
||||||
term_glyph:
|
term_glyph:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: term_glyph
|
name: term_glyph
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.2.1"
|
||||||
test_api:
|
test_api:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.4.9"
|
version: "0.4.12"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
Reference in New Issue
Block a user