[PATCH v2] Make compatible with Windows
Export this patch
---
lib/database.dart | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/database.dart b/lib/database.dart
index f1360c0..799f3a4 100644
--- a/lib/database.dart
+++ b/lib/database.dart
@@ -140,7 +140,7 @@ class DB {
static Future<DB> open() async {
WidgetsFlutterBinding.ensureInitialized();
- if (Platform.isLinux) {
+ if (Platform.isWindows || Platform.isLinux) {
sqfliteFfiInit();
databaseFactory = databaseFactoryFfi;
}
@@ -234,6 +234,9 @@ class DB {
}
static Future<String> _getBasePath() {
+ if (Platform.isWindows) {
+ return Future.value(join(Platform.environment['APPDATA']!, 'goguma'));
+ }
if (!Platform.isLinux) {
return getDatabasesPath();
}
base-commit: 51352488310fc19b127267b63792f59964518bd5
--
2.17.1
Pushed, thanks!