Merge pull request #1959 from simolus3/fix-lint-warning

Fix lint warnings when strict type check enabled
This commit is contained in:
Simon Binder 2022-08-08 13:32:58 +02:00 committed by GitHub
commit 5063afb8a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 25 additions and 13 deletions

View File

@ -686,7 +686,8 @@ abstract class _$Database extends GeneratedDatabase {
late final $TodoItemWithCategoryNameViewView customViewName = late final $TodoItemWithCategoryNameViewView customViewName =
$TodoItemWithCategoryNameViewView(this); $TodoItemWithCategoryNameViewView(this);
@override @override
Iterable<TableInfo> get allTables => allSchemaEntities.whereType<TableInfo>(); Iterable<TableInfo<Table, dynamic>> get allTables =>
allSchemaEntities.whereType<TableInfo<Table, Object?>>();
@override @override
List<DatabaseSchemaEntity> get allSchemaEntities => List<DatabaseSchemaEntity> get allSchemaEntities =>
[todoCategories, todoItems, todoCategoryItemCount, customViewName]; [todoCategories, todoItems, todoCategoryItemCount, customViewName];

View File

@ -1826,7 +1826,8 @@ abstract class _$CustomTablesDb extends GeneratedDatabase {
} }
@override @override
Iterable<TableInfo> get allTables => allSchemaEntities.whereType<TableInfo>(); Iterable<TableInfo<Table, dynamic>> get allTables =>
allSchemaEntities.whereType<TableInfo<Table, Object?>>();
@override @override
List<DatabaseSchemaEntity> get allSchemaEntities => [ List<DatabaseSchemaEntity> get allSchemaEntities => [
config, config,

View File

@ -1667,7 +1667,8 @@ abstract class _$TodoDb extends GeneratedDatabase {
} }
@override @override
Iterable<TableInfo> get allTables => allSchemaEntities.whereType<TableInfo>(); Iterable<TableInfo<Table, dynamic>> get allTables =>
allSchemaEntities.whereType<TableInfo<Table, Object?>>();
@override @override
List<DatabaseSchemaEntity> get allSchemaEntities => [ List<DatabaseSchemaEntity> get allSchemaEntities => [
categories, categories,

View File

@ -117,8 +117,9 @@ class DatabaseWriter {
// Write List of tables // Write List of tables
final schemaScope = dbScope.leaf(); final schemaScope = dbScope.leaf();
schemaScope schemaScope
..write('@override\nIterable<TableInfo> get allTables => ') ..write(
..write('allSchemaEntities.whereType<TableInfo>();\n') '@override\nIterable<TableInfo<Table, dynamic>> get allTables => ')
..write('allSchemaEntities.whereType<TableInfo<Table, Object?>>();\n')
..write('@override\nList<DatabaseSchemaEntity> get allSchemaEntities ') ..write('@override\nList<DatabaseSchemaEntity> get allSchemaEntities ')
..write('=> ['); ..write('=> [');

View File

@ -660,7 +660,8 @@ abstract class _$AppDatabase extends GeneratedDatabase {
} }
@override @override
Iterable<TableInfo> get allTables => allSchemaEntities.whereType<TableInfo>(); Iterable<TableInfo<Table, dynamic>> get allTables =>
allSchemaEntities.whereType<TableInfo<Table, Object?>>();
@override @override
List<DatabaseSchemaEntity> get allSchemaEntities => List<DatabaseSchemaEntity> get allSchemaEntities =>
[categories, todoEntries, textEntries, todosInsert]; [categories, todoEntries, textEntries, todosInsert];

View File

@ -203,7 +203,8 @@ abstract class _$MyDatabase extends GeneratedDatabase {
} }
@override @override
Iterable<TableInfo> get allTables => allSchemaEntities.whereType<TableInfo>(); Iterable<TableInfo<Table, dynamic>> get allTables =>
allSchemaEntities.whereType<TableInfo<Table, Object?>>();
@override @override
List<DatabaseSchemaEntity> get allSchemaEntities => [entries]; List<DatabaseSchemaEntity> get allSchemaEntities => [entries];
} }

View File

@ -638,7 +638,8 @@ abstract class _$Database extends GeneratedDatabase {
late final Groups groups = Groups(this); late final Groups groups = Groups(this);
late final GroupCount groupCount = GroupCount(this); late final GroupCount groupCount = GroupCount(this);
@override @override
Iterable<TableInfo> get allTables => allSchemaEntities.whereType<TableInfo>(); Iterable<TableInfo<Table, dynamic>> get allTables =>
allSchemaEntities.whereType<TableInfo<Table, Object?>>();
@override @override
List<DatabaseSchemaEntity> get allSchemaEntities => List<DatabaseSchemaEntity> get allSchemaEntities =>
[users, groups, groupCount]; [users, groups, groupCount];

View File

@ -204,7 +204,8 @@ abstract class _$MyDatabase extends GeneratedDatabase {
} }
@override @override
Iterable<TableInfo> get allTables => allSchemaEntities.whereType<TableInfo>(); Iterable<TableInfo<Table, dynamic>> get allTables =>
allSchemaEntities.whereType<TableInfo<Table, Object?>>();
@override @override
List<DatabaseSchemaEntity> get allSchemaEntities => [entries]; List<DatabaseSchemaEntity> get allSchemaEntities => [entries];
} }

View File

@ -180,7 +180,8 @@ abstract class _$Database extends GeneratedDatabase {
_$Database(QueryExecutor e) : super(e); _$Database(QueryExecutor e) : super(e);
late final Users users = Users(this); late final Users users = Users(this);
@override @override
Iterable<TableInfo> get allTables => allSchemaEntities.whereType<TableInfo>(); Iterable<TableInfo<Table, dynamic>> get allTables =>
allSchemaEntities.whereType<TableInfo<Table, Object?>>();
@override @override
List<DatabaseSchemaEntity> get allSchemaEntities => [users]; List<DatabaseSchemaEntity> get allSchemaEntities => [users];
} }

View File

@ -180,7 +180,8 @@ abstract class _$Database extends GeneratedDatabase {
_$Database(QueryExecutor e) : super(e); _$Database(QueryExecutor e) : super(e);
late final $KeyValuesTable keyValues = $KeyValuesTable(this); late final $KeyValuesTable keyValues = $KeyValuesTable(this);
@override @override
Iterable<TableInfo> get allTables => allSchemaEntities.whereType<TableInfo>(); Iterable<TableInfo<Table, dynamic>> get allTables =>
allSchemaEntities.whereType<TableInfo<Table, Object?>>();
@override @override
List<DatabaseSchemaEntity> get allSchemaEntities => [keyValues]; List<DatabaseSchemaEntity> get allSchemaEntities => [keyValues];
} }

View File

@ -635,7 +635,8 @@ abstract class _$Database extends GeneratedDatabase {
} }
@override @override
Iterable<TableInfo> get allTables => allSchemaEntities.whereType<TableInfo>(); Iterable<TableInfo<Table, dynamic>> get allTables =>
allSchemaEntities.whereType<TableInfo<Table, Object?>>();
@override @override
List<DatabaseSchemaEntity> get allSchemaEntities => [users, friendships]; List<DatabaseSchemaEntity> get allSchemaEntities => [users, friendships];
} }

View File

@ -282,7 +282,8 @@ abstract class _$_FakeDb extends GeneratedDatabase {
late final $FoosTable foos = $FoosTable(this); late final $FoosTable foos = $FoosTable(this);
late final $BarsTable bars = $BarsTable(this); late final $BarsTable bars = $BarsTable(this);
@override @override
Iterable<TableInfo> get allTables => allSchemaEntities.whereType<TableInfo>(); Iterable<TableInfo<Table, dynamic>> get allTables =>
allSchemaEntities.whereType<TableInfo<Table, Object?>>();
@override @override
List<DatabaseSchemaEntity> get allSchemaEntities => [foos, bars]; List<DatabaseSchemaEntity> get allSchemaEntities => [foos, bars];
} }