fix(windows): Make database on windows persistent

Took 16 minutes
This commit is contained in:
MTRNord 2020-10-22 16:04:25 +02:00
parent 5e4a4eab8d
commit 3e2c69ed1a
No known key found for this signature in database
GPG Key ID: 24246E46C46C8623
3 changed files with 4 additions and 3 deletions

View File

@ -71,7 +71,8 @@ Future<Database> constructDb(
} else if (Platform.isWindows) {
debugPrint('[Moor] using Windows desktop moor');
open.overrideFor(OperatingSystem.windows, _openOnWindows);
return Database(moor.VmDatabase.memory());
final appDocDir = await getApplicationSupportDirectory();
return Database(moor.VmDatabase(File('${appDocDir.path}/$filename')));
}
throw Exception('Platform not supported');
}

View File

@ -647,7 +647,7 @@ packages:
name: path_provider
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.18"
version: "1.6.21"
path_provider_linux:
dependency: transitive
description:

View File

@ -38,7 +38,7 @@ dependencies:
flutter_local_notifications: ^1.4.3
# desktop_notifications: ^0.0.0-dev.4 // Currently blocked by: https://github.com/canonical/desktop_notifications.dart/issues/5
matrix_link_text: ^0.3.1
path_provider: ^1.5.1
path_provider: ^1.6.21
webview_flutter: ^0.3.19+9
share: ^0.6.3+5
flutter_secure_storage: ^3.3.4