fix: termux compatibility (#472)

This commit is contained in:
lollipopkit🏳️‍⚧️
2024-07-20 20:35:30 +08:00
committed by GitHub
parent 2907ac74d4
commit b0936c5e6e
7 changed files with 53 additions and 82 deletions

View File

@@ -95,6 +95,12 @@ Future<void> _initData() async {
Hive.registerAdapter(ServerCustomAdapter()); // 7
Hive.registerAdapter(WakeOnLanCfgAdapter()); // 8
try {
/// Apps' data on other platforms are stored in a container that prevents
/// access by other apps. Therefore, there is no need to encrypt the data.
if (isLinux || isWindows) await SecureStore.init();
} catch (_) {}
await Stores.setting.init();
await Stores.server.init();
await Stores.key.init();