Fix CI on Dart 2.13

This commit is contained in:
Simon Binder 2021-05-18 22:19:57 +02:00
parent d9dd76e484
commit 8f3a976d6e
No known key found for this signature in database
GPG Key ID: 7891917E4147B8C0
6 changed files with 24 additions and 22 deletions

View File

@ -576,7 +576,7 @@ class IngredientsCompanion extends UpdateCompanion<Ingredient> {
this.id = const Value.absent(),
required String name,
required int caloriesPer100g,
}) : name = Value(name),
}) : name = Value(name),
caloriesPer100g = Value(caloriesPer100g);
static Insertable<Ingredient> custom({
Expression<int>? id,
@ -813,7 +813,7 @@ class IngredientInRecipesCompanion extends UpdateCompanion<IngredientInRecipe> {
required int recipe,
required int ingredient,
required int amountInGrams,
}) : recipe = Value(recipe),
}) : recipe = Value(recipe),
ingredient = Value(ingredient),
amountInGrams = Value(amountInGrams);
static Insertable<IngredientInRecipe> custom({

View File

@ -10,26 +10,26 @@ environment:
dependencies:
async: ^2.5.0
convert: "^3.0.0"
convert: ^3.0.0
collection: ^1.15.0
meta: ^1.3.0
pedantic: ^1.10.0
stream_channel: ^2.1.0
sqlite3: ">=0.1.9-nullsafety <2.0.0"
sqlite3: ^1.0.0
dev_dependencies:
build_test: ^2.0.0
build_runner_core: ^7.0.0
moor_generator: any
uuid: ^3.0.0-nullsafety.0
path: ^1.8.0-nullsafety.3
uuid: ^3.0.0
path: ^1.8.0
build_runner: ^2.0.0
test: ^1.16.0
mockito: ^5.0.0-nullsafety.7
rxdart: ^0.26.0-nullsafety
test: ^1.17.0
mockito: ^5.0.7
rxdart: ^0.27.0
dependency_overrides:
moor_generator:
path: ../moor_generator
sqlparser:
path: ../sqlparser
path: ../sqlparser

View File

@ -1172,7 +1172,7 @@ class EmailCompanion extends UpdateCompanion<EMail> {
required String sender,
required String title,
required String body,
}) : sender = Value(sender),
}) : sender = Value(sender),
title = Value(title),
body = Value(body);
static Insertable<EMail> custom({
@ -1385,7 +1385,7 @@ class WeirdTableCompanion extends UpdateCompanion<WeirdData> {
WeirdTableCompanion.insert({
required int sqlClass,
required String textColumn,
}) : sqlClass = Value(sqlClass),
}) : sqlClass = Value(sqlClass),
textColumn = Value(textColumn);
static Insertable<WeirdData> custom({
Expression<int>? sqlClass,

View File

@ -955,7 +955,7 @@ class SharedTodosCompanion extends UpdateCompanion<SharedTodo> {
SharedTodosCompanion.insert({
required int todo,
required int user,
}) : todo = Value(todo),
}) : todo = Value(todo),
user = Value(user);
static Insertable<SharedTodo> custom({
Expression<int>? todo,

View File

@ -122,7 +122,7 @@ class MockStreamQueries extends Mock implements StreamQueryStore {
const Stream<Never>.empty());
@override
Stream<Null?> updatesForSync(TableUpdateQuery? query) => _nsm(
Stream<Null> updatesForSync(TableUpdateQuery? query) => _nsm(
Invocation.method(#updatesForSync, [query]), const Stream<Never>.empty());
@override

View File

@ -7,12 +7,12 @@ import 'package:ffi/ffi.dart';
import 'package:sqlparser/src/reader/tokenizer/token.dart';
typedef sqlite3_keyword_count_native = Int32 Function();
typedef sqlite3_keyword_count = int Function();
typedef SqliteKeywordCountNative = Int32 Function();
typedef SqliteKeywordCount = int Function();
typedef sqlite3_keyword_name_native = Int32 Function(
typedef SqliteKeywordNameNative = Int32 Function(
Int32, Pointer<Pointer<Uint8>>, Pointer<Int32>);
typedef sqlite3_keyword_name = int Function(
typedef SqliteKeywordName = int Function(
int, Pointer<Pointer<Uint8>>, Pointer<Int32>);
void main() {
@ -31,10 +31,12 @@ void main() {
test(
'recognizes all sqlite tokens',
() {
final keywordCount = library.lookupFunction<sqlite3_keyword_count_native,
sqlite3_keyword_count>('sqlite3_keyword_count')();
final nameFunction = library.lookupFunction<sqlite3_keyword_name_native,
sqlite3_keyword_name>('sqlite3_keyword_name');
final keywordCount =
library.lookupFunction<SqliteKeywordCountNative, SqliteKeywordCount>(
'sqlite3_keyword_count')();
final nameFunction =
library.lookupFunction<SqliteKeywordNameNative, SqliteKeywordName>(
'sqlite3_keyword_name');
final charOut = malloc<Pointer<Uint8>>();
final lengthOut = malloc<Int32>();