Upgrade to stable sqflite with null-safety

This commit is contained in:
Simon Binder 2021-03-25 09:19:46 +01:00
parent ab0c2c5e55
commit 8f069c86f4
No known key found for this signature in database
GPG Key ID: 7891917E4147B8C0
4 changed files with 14 additions and 17 deletions

View File

@ -1,4 +1,4 @@
## 4.0.0-nullsafety
## 4.0.0
- Support moor version 4
- Migrate to null-safety

View File

@ -32,11 +32,8 @@ class _SqfliteDelegate extends DatabaseDelegate with _SqfliteExecutor {
_SqfliteDelegate(this.inDbFolder, this.path,
{this.singleInstance = true, this.creator});
DbVersionDelegate? _delegate;
@override
DbVersionDelegate get versionDelegate {
return _delegate ??= _SqfliteVersionDelegate(db);
}
late final DbVersionDelegate versionDelegate = _SqfliteVersionDelegate(db);
@override
TransactionDelegate get transactionDelegate =>
@ -49,7 +46,7 @@ class _SqfliteDelegate extends DatabaseDelegate with _SqfliteExecutor {
Future<void> open(QueryExecutorUser user) async {
String resolvedPath;
if (inDbFolder) {
resolvedPath = join((await s.getDatabasesPath())!, path);
resolvedPath = join(await s.getDatabasesPath(), path);
} else {
resolvedPath = path;
}

View File

@ -49,7 +49,7 @@ packages:
name: convert
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
version: "3.0.0"
fake_async:
dependency: transitive
description:
@ -94,7 +94,7 @@ packages:
name: moor
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0-nullsafety.1"
version: "4.2.1"
path:
dependency: "direct main"
description:
@ -108,7 +108,7 @@ packages:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.3"
version: "1.11.0"
sky_engine:
dependency: transitive
description: flutter
@ -127,14 +127,14 @@ packages:
name: sqflite
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0-nullsafety.2"
version: "2.0.0+3"
sqflite_common:
dependency: transitive
description:
name: sqflite_common
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0-nullsafety.2"
version: "2.0.0+2"
sqlite3:
dependency: transitive
description:
@ -169,7 +169,7 @@ packages:
name: synchronized
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.0-nullsafety.1"
version: "3.0.0"
term_glyph:
dependency: transitive
description:
@ -199,5 +199,5 @@ packages:
source: hosted
version: "2.1.0"
sdks:
dart: ">=2.12.0-29 <3.0.0"
dart: ">=2.12.0 <3.0.0"
flutter: ">=1.24.0-10"

View File

@ -1,6 +1,6 @@
name: moor_flutter
description: Flutter implementation of moor, a safe and reactive persistence library for Dart applications
version: 4.0.0-nullsafety
version: 4.0.0
repository: https://github.com/simolus3/moor
homepage: https://moor.simonbinder.eu/
issue_tracker: https://github.com/simolus3/moor/issues
@ -9,9 +9,9 @@ environment:
sdk: '>=2.12.0-0 <3.0.0'
dependencies:
moor: ^4.0.0-nullsafety
sqflite: '>=2.0.0-nullsafety <3.0.0'
path: '>1.8.0-nullsafety <2.0.0'
moor: ^4.0.0
sqflite: ^2.0.0+3
path: ^1.8.0
flutter:
sdk: flutter