Porgress use dynamic color

This commit is contained in:
LollipopKit
2021-11-01 15:26:29 +08:00
parent 1cd69c8f44
commit e7d87b40b8
11 changed files with 40 additions and 31 deletions

View File

@@ -29,7 +29,7 @@ class TcpStatus {
passive = json["passive"].toInt();
fail = json["fail"].toInt();
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data["maxConn"] = maxConn;

View File

@@ -114,7 +114,9 @@ class ServerProvider extends BusyProvider {
final client = _servers[idx].client;
final connected = await client.isConnected();
final state = _servers[idx].connectionState;
if (!connected || state == ServerConnectionState.failed || state == ServerConnectionState.disconnected) {
if (!connected ||
state == ServerConnectionState.failed ||
state == ServerConnectionState.disconnected) {
_servers[idx].connectionState = ServerConnectionState.connecting;
notifyListeners();
final time1 = DateTime.now();

View File

@@ -2,8 +2,9 @@
class BuildData {
static const String name = "ToolBox";
static const int build = 44;
static const String engine = "Flutter 2.5.3 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision 18116933e7 (2 weeks ago) • 2021-10-15 10:46:35 -0700\nEngine • revision d3ea636dc5\nTools • Dart 2.14.4\n";
static const String buildAt = "2021-10-29 13:31:42.064782";
static const int build = 50;
static const String engine =
"Flutter 2.5.3 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision 18116933e7 (2 weeks ago) • 2021-10-15 10:46:35 -0700\nEngine • revision d3ea636dc5\nTools • Dart 2.14.4\n";
static const String buildAt = "2021-10-31 22:21:56.798068";
static const int modifications = 1;
}

View File

@@ -18,3 +18,4 @@ class DynamicColor {
}
final mainColor = DynamicColor(Colors.black87, Colors.white70);
final progressColor = DynamicColor(Colors.grey.shade100, Colors.grey);

View File

@@ -1,4 +1,4 @@
import 'package:toolbox/data/model/server/linux_icon.dart';
final linuxIcons = LinuxIcons(['ubuntu', 'arch', 'centos', 'debian', 'fedora',
'opensuse', 'kali']);
final linuxIcons = LinuxIcons(
['ubuntu', 'arch', 'centos', 'debian', 'fedora', 'opensuse', 'kali']);

View File

@@ -11,8 +11,7 @@ class SnippetStore extends PersistentStore {
}
List<Snippet> fetch() {
return getSnippetList(
json.decode(box.get('snippet', defaultValue: '[]')!));
return getSnippetList(json.decode(box.get('snippet', defaultValue: '[]')!));
}
void delete(Snippet s) {
@@ -30,4 +29,4 @@ class SnippetStore extends PersistentStore {
int index(Snippet s) => fetch().indexWhere((e) => e.name == s.name);
bool have(Snippet s) => index(s) != -1;
}
}