diff --git a/json_serializable/test/src/_json_serializable_test_input.dart b/json_serializable/test/src/_json_serializable_test_input.dart index 0f792b495..bdd061d00 100644 --- a/json_serializable/test/src/_json_serializable_test_input.dart +++ b/json_serializable/test/src/_json_serializable_test_input.dart @@ -84,7 +84,7 @@ class GeneralTestClass1 { late DateTime dateOfBirth; dynamic dynamicType; - //ignore: prefer_typing_uninitialized_variables,type_annotate_public_apis,inference_failure_on_uninitialized_variable + //ignore: prefer_typing_uninitialized_variables,type_annotate_public_apis,inference_failure_on_uninitialized_variable, strict_top_level_inference var varType; late List listOfInts; } diff --git a/json_serializable/test/src/to_from_json_test_input.dart b/json_serializable/test/src/to_from_json_test_input.dart index 21bb81bd7..d352e3027 100644 --- a/json_serializable/test/src/to_from_json_test_input.dart +++ b/json_serializable/test/src/to_from_json_test_input.dart @@ -4,6 +4,8 @@ // @dart=3.6 +// ignore_for_file: strict_top_level_inference + part of '_json_serializable_test_input.dart'; int _toInt(bool input) => 42; diff --git a/json_serializable/test/test_sources/test_sources.dart b/json_serializable/test/test_sources/test_sources.dart index 786931080..80a08aa3b 100644 --- a/json_serializable/test/test_sources/test_sources.dart +++ b/json_serializable/test/test_sources/test_sources.dart @@ -44,7 +44,7 @@ class FromJsonOptionalParameters { } class ChildWithFromJson { - //ignore: avoid_unused_constructor_parameters + //ignore: avoid_unused_constructor_parameters, strict_top_level_inference ChildWithFromJson.fromJson(json, {initValue = false}); } diff --git a/json_serializable/tool/field_matrix_builder.dart b/json_serializable/tool/field_matrix_builder.dart index 885357c17..32084658b 100644 --- a/json_serializable/tool/field_matrix_builder.dart +++ b/json_serializable/tool/field_matrix_builder.dart @@ -10,7 +10,7 @@ import 'package:source_helper/source_helper.dart'; import 'shared.dart'; -Builder builder([_]) => _FieldMatrixBuilder(); +Builder builder([BuilderOptions? _]) => _FieldMatrixBuilder(); class _FieldMatrixBuilder extends Builder { @override diff --git a/json_serializable/tool/readme_builder.dart b/json_serializable/tool/readme_builder.dart index 4daf44ae0..1de8c6398 100644 --- a/json_serializable/tool/readme_builder.dart +++ b/json_serializable/tool/readme_builder.dart @@ -13,7 +13,7 @@ import 'package:yaml/yaml.dart'; import 'test_type_builder.dart'; import 'test_type_data.dart'; -Builder readmeBuilder([_]) => _ReadmeBuilder(); +Builder readmeBuilder([BuilderOptions? _]) => _ReadmeBuilder(); class _ReadmeBuilder extends Builder { @override diff --git a/json_serializable/tool/test_builder.dart b/json_serializable/tool/test_builder.dart index de50e3dac..8f742241c 100644 --- a/json_serializable/tool/test_builder.dart +++ b/json_serializable/tool/test_builder.dart @@ -10,7 +10,8 @@ import 'package:path/path.dart' as p; import 'shared.dart'; -Builder testBuilder([_]) => validate('_test_builder', const _TestBuilder()); +Builder testBuilder([BuilderOptions? _]) => + validate('_test_builder', const _TestBuilder()); class _TestBuilder implements Builder { const _TestBuilder(); diff --git a/json_serializable/tool/test_type_builder.dart b/json_serializable/tool/test_type_builder.dart index 8b25a0815..2c23c8d3a 100644 --- a/json_serializable/tool/test_type_builder.dart +++ b/json_serializable/tool/test_type_builder.dart @@ -118,7 +118,8 @@ final _iterableGenericArgs = ([ const _defaultCollectionExpressions = '42, true, false, null'; const _altCollectionExpressions = '43, false'; -Builder typeBuilder([_]) => validate('_type_builder', const _TypeBuilder()); +Builder typeBuilder([BuilderOptions? _]) => + validate('_type_builder', const _TypeBuilder()); class _TypeBuilder implements Builder { const _TypeBuilder(); @@ -147,7 +148,7 @@ class _TypeBuilder implements Builder { {'.dart': _allTypes.keys.map(toTypeExtension).toSet().toList()..sort()}; } -Builder typeTestBuilder([_]) => +Builder typeTestBuilder([BuilderOptions? _]) => validate('_type_test_builder', const _TypeTestBuilder()); class _TypeTestBuilder implements Builder {