mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 23:34:24 +01:00
opt.: sync immediately after changes (#577)
This commit is contained in:
@@ -5,7 +5,9 @@ import 'package:server_box/data/res/store.dart';
|
||||
const _keyConfig = 'providerConfig';
|
||||
|
||||
class ContainerStore extends PersistentStore {
|
||||
ContainerStore() : super('docker');
|
||||
ContainerStore._() : super('docker');
|
||||
|
||||
static final instance = ContainerStore._();
|
||||
|
||||
String? fetch(String? id) {
|
||||
return box.get(id);
|
||||
|
||||
@@ -46,7 +46,9 @@ class _MapHistory {
|
||||
}
|
||||
|
||||
class HistoryStore extends PersistentStore {
|
||||
HistoryStore() : super('history');
|
||||
HistoryStore._() : super('history');
|
||||
|
||||
static final instance = HistoryStore._();
|
||||
|
||||
/// Paths that user has visited by 'Locate' button
|
||||
late final sftpGoPath = _ListHistory(box: box, name: 'sftpPath');
|
||||
|
||||
@@ -3,7 +3,9 @@ import 'package:fl_lib/fl_lib.dart';
|
||||
import 'package:server_box/data/model/server/private_key_info.dart';
|
||||
|
||||
class PrivateKeyStore extends PersistentStore {
|
||||
PrivateKeyStore() : super('key');
|
||||
PrivateKeyStore._() : super('key');
|
||||
|
||||
static final instance = PrivateKeyStore._();
|
||||
|
||||
void put(PrivateKeyInfo info) {
|
||||
box.put(info.id, info);
|
||||
|
||||
@@ -3,7 +3,9 @@ import 'package:fl_lib/fl_lib.dart';
|
||||
import 'package:server_box/data/model/server/server_private_info.dart';
|
||||
|
||||
class ServerStore extends PersistentStore {
|
||||
ServerStore() : super('server');
|
||||
ServerStore._() : super('server');
|
||||
|
||||
static final instance = ServerStore._();
|
||||
|
||||
void put(Spi info) {
|
||||
box.put(info.id, info);
|
||||
|
||||
@@ -7,7 +7,9 @@ import 'package:server_box/data/model/app/net_view.dart';
|
||||
import 'package:server_box/data/res/default.dart';
|
||||
|
||||
class SettingStore extends PersistentStore {
|
||||
SettingStore() : super('setting');
|
||||
SettingStore._() : super('setting');
|
||||
|
||||
static final instance = SettingStore._();
|
||||
|
||||
// ------BEGIN------
|
||||
//
|
||||
|
||||
@@ -3,7 +3,9 @@ import 'package:fl_lib/fl_lib.dart';
|
||||
import 'package:server_box/data/model/server/snippet.dart';
|
||||
|
||||
class SnippetStore extends PersistentStore {
|
||||
SnippetStore() : super('snippet');
|
||||
SnippetStore._() : super('snippet');
|
||||
|
||||
static final instance = SnippetStore._();
|
||||
|
||||
void put(Snippet snippet) {
|
||||
box.put(snippet.name, snippet);
|
||||
|
||||
Reference in New Issue
Block a user