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 - Support moor version 4
- Migrate to null-safety - Migrate to null-safety

View File

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

View File

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

View File

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