opt.: migrate to new fl_lib (#649)

Fixes #648
This commit is contained in:
lollipopkit🏳️‍⚧️
2024-12-02 21:06:44 +08:00
committed by GitHub
parent b882baeafa
commit ddd32e82d4
50 changed files with 10858 additions and 225 deletions

View File

@@ -4,7 +4,7 @@ import 'package:server_box/data/res/store.dart';
const _keyConfig = 'providerConfig';
class ContainerStore extends PersistentStore {
class ContainerStore extends HiveStore {
ContainerStore._() : super('docker');
static final instance = ContainerStore._();
@@ -15,7 +15,7 @@ class ContainerStore extends PersistentStore {
void put(String id, String host) {
box.put(id, host);
box.updateLastModified();
updateLastUpdateTs();
}
ContainerType getType([String id = '']) {
@@ -30,7 +30,7 @@ class ContainerStore extends PersistentStore {
}
ContainerType get defaultType {
if (Stores.setting.usePodman.fetch()) return ContainerType.podman;
if (Stores.setting.usePodman.get()) return ContainerType.podman;
return ContainerType.docker;
}
@@ -40,6 +40,6 @@ class ContainerStore extends PersistentStore {
} else {
box.put(_keyConfig + id, type.toString());
}
box.updateLastModified();
updateLastUpdateTs();
}
}