This commit is contained in:
lollipopkit
2023-08-10 18:05:24 +08:00
parent cf1c9643b9
commit 4788f1dddc
8 changed files with 56 additions and 47 deletions

View File

@@ -198,7 +198,7 @@ class DockerProvider extends ChangeNotifier {
// judge whether to use DOCKER_HOST
String _wrap(String cmd) {
final dockerHost = _dockerStore.getDockerHost(hostId!);
final dockerHost = _dockerStore.fetch(hostId!);
if (dockerHost == null || dockerHost.isEmpty) {
return cmd.withLangExport;
}

View File

@@ -2,8 +2,8 @@
class BuildData {
static const String name = "ServerBox";
static const int build = 458;
static const int build = 459;
static const String engine = "3.10.6";
static const String buildAt = "2023-08-10 00:04:32.937108";
static const int modifications = 5;
static const String buildAt = "2023-08-10 00:38:01.678410";
static const int modifications = 3;
}

View File

@@ -1,15 +1,15 @@
import 'package:toolbox/core/persistant_store.dart';
class DockerStore extends PersistentStore {
String? getDockerHost(String id) {
String? fetch(String id) {
return box.get(id);
}
void setDockerHost(String id, String host) {
void put(String id, String host) {
box.put(id, host);
}
Map<String, String> fetch() {
Map<String, String> fetchAll() {
return box.toMap().cast<String, String>();
}
}