mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
new: snippet for installing ServerBoxMonitor
This commit is contained in:
@@ -29,9 +29,19 @@ class SnippetProvider extends ChangeNotifier {
|
|||||||
order.removeWhere((e) => surplus.any((ele) => ele == e));
|
order.removeWhere((e) => surplus.any((ele) => ele == e));
|
||||||
_setting.snippetOrder.put(order);
|
_setting.snippetOrder.put(order);
|
||||||
}
|
}
|
||||||
|
_addInternal();
|
||||||
_updateTags();
|
_updateTags();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _addInternal() {
|
||||||
|
if (!_setting.fTISBM.fetch()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_snippets.add(installSBM);
|
||||||
|
_store.put(installSBM);
|
||||||
|
_setting.fTISBM.put(false);
|
||||||
|
}
|
||||||
|
|
||||||
void _updateTags() {
|
void _updateTags() {
|
||||||
_tags.clear();
|
_tags.clear();
|
||||||
final tags = <String>{};
|
final tags = <String>{};
|
||||||
|
|||||||
@@ -191,9 +191,15 @@ class SettingStore extends PersistentStore {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Never show these settings for users
|
// Never show these settings for users
|
||||||
|
// Guide for these settings:
|
||||||
|
// - key should start with `_` and be shorter as possible
|
||||||
|
//
|
||||||
// ------BEGIN------
|
// ------BEGIN------
|
||||||
|
|
||||||
/// Version of store db
|
/// Version of store db
|
||||||
late final storeVersion = StoreProperty(box, 'storeVersion', 0);
|
late final storeVersion = StoreProperty(box, 'storeVersion', 0);
|
||||||
|
|
||||||
|
/// Whether is first time to add Snippet<Install ServerBoxMonitor>
|
||||||
|
late final fTISBM = StoreProperty(box, '_fTISBM', true);
|
||||||
// ------END------
|
// ------END------
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user