Support analyzer 4.x.x (#1841)

This commit is contained in:
Jishnu Mohan 2022-05-18 18:39:46 +08:00 committed by GitHub
parent fa13024940
commit dc4e542f26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View File

@ -23,7 +23,8 @@ dev_dependencies:
shelf: ^1.2.0 shelf: ^1.2.0
shelf_static: ^1.1.0 shelf_static: ^1.1.0
# `dart doc` is missing some options, so we run `dart run dartdoc` instead. # `dart doc` is missing some options, so we run `dart run dartdoc` instead.
dartdoc: ^5.0.1 # 5.1.0 release is broken: https://github.com/dart-lang/dartdoc/issues/3041
dartdoc: '5.0.1'
code_snippets: code_snippets:
hosted: https://simonbinder.eu hosted: https://simonbinder.eu
version: ^0.0.4 version: ^0.0.4
@ -41,6 +42,7 @@ dev_dependencies:
drift_dev: drift_dev:
dependency_overrides: dependency_overrides:
analyzer: ^4.0.0
moor: moor:
path: ../moor path: ../moor
moor_generator: moor_generator:

View File

@ -124,7 +124,7 @@ void _checkType(ParameterElement element, MoorColumn column, Step step) {
if (library.isNonNullableByDefault && if (library.isNonNullableByDefault &&
nullableDartType && nullableDartType &&
!typesystem.isNullable(type) && !typesystem.isNullable(type) &&
element.isNotOptional) { element.isRequired) {
error('Expected this parameter to be nullable'); error('Expected this parameter to be nullable');
return; return;
} }

View File

@ -30,8 +30,8 @@ dependencies:
sqlparser: ^0.21.0 sqlparser: ^0.21.0
# Dart analysis # Dart analysis
analyzer: ">=2.1.0 <4.0.0" analyzer: "^4.0.0"
analyzer_plugin: '>=0.8.0 <0.10.0' analyzer_plugin: '^0.10.0'
source_span: ^1.5.5 source_span: ^1.5.5
package_config: ^2.0.0 package_config: ^2.0.0
pub_semver: ^2.0.0 pub_semver: ^2.0.0