diff --git a/functional_data_generator/lib/builder.dart b/functional_data_generator/lib/builder.dart index f50128e..ff1f0e3 100644 --- a/functional_data_generator/lib/builder.dart +++ b/functional_data_generator/lib/builder.dart @@ -72,7 +72,7 @@ Future _generateDataType(Element element, ConstantReader annotation, Bui final positionalFields = genericConstructor.formalParameters.where((p) => p.isPositional).map((p) => p.name).toList(); final fieldsWithIndex = - await Future.wait(classElement.fields.where((f) => !f.isSynthetic && !f.isStatic).map((f) async { + await Future.wait(classElement.fields.where((f) => f.nonSynthetic == f && !f.isStatic).map((f) async { final declaration = await buildStep.resolver.astNodeFor(f.firstFragment) as VariableDeclaration?; final declarationList = declaration?.parent as VariableDeclarationList?; final positionalIndex = positionalFields.indexOf(f.name); diff --git a/functional_data_generator/pubspec.yaml b/functional_data_generator/pubspec.yaml index bb4e45b..24eaec9 100644 --- a/functional_data_generator/pubspec.yaml +++ b/functional_data_generator/pubspec.yaml @@ -1,5 +1,5 @@ name: functional_data_generator -version: 2.2.2 +version: 2.2.3 description: >- Simple and non-intrusive code generator for boilerplate of data types. homepage: https://github.com/spkersten/dart_functional_data @@ -8,7 +8,7 @@ environment: sdk: '>=2.19.0 <4.0.0' dependencies: - analyzer: '^8.0.0' + analyzer: '>=8.1.1 <13.0.0' build: ^4.0.0 collection: ^1.15.0 functional_data: ^1.1.1