fix: Flutter Hive on Linux

This commit is contained in:
Christian Pauly 2021-06-29 07:59:37 +02:00
parent 6bbd6eb0c0
commit 1c1a4fa4f3
2 changed files with 6 additions and 1 deletions

1
.gitignore vendored
View File

@ -5,6 +5,7 @@
*.swp
*.snap
.DS_Store
.local/
.atom/
.buildlog/
.history

View File

@ -24,7 +24,11 @@ class FlutterFamedlySdkHiveDatabase extends FamedlySdkHiveDatabase {
Client client) async {
if (!kIsWeb && !_hiveInitialized) {
Logs().i('Init Hive database...');
await Hive.initFlutter();
if (!kIsWeb && Platform.isLinux) {
Hive.init('.local/share/fluffychat/');
} else {
await Hive.initFlutter();
}
_hiveInitialized = true;
}
HiveCipher hiverCipher;