Skip to content

feat: v0.1.0 - simplify form APIs, support Dart 3.13 + analyzer 13.x - #12

Open
jeroen-meijer wants to merge 16 commits into
mainfrom
feat/v0.1.0
Open

feat: v0.1.0 - simplify form APIs, support Dart 3.13 + analyzer 13.x#12
jeroen-meijer wants to merge 16 commits into
mainfrom
feat/v0.1.0

Conversation

@jeroen-meijer

@jeroen-meijer jeroen-meijer commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Note

I no longer have push access to this repo. The branch now lives at jeroen-meijer/shape@feat/v0.1.0.

Description

This PR reworks the shape and shape_generator APIs for v0.1.0, cutting form boilerplate while keeping generated behavior explicit and tested.

API changes

  • Remove FormBody and FormErrors generic type parameters from the public API
  • Add SimpleFormField<T, E> and @FieldRequired() for required validation on optional params
  • Support redirecting factories and automatic GenericFormField wrapping for plain params in the generator
  • Keep explicit custom field wrappers in generated form bodies
  • Drop Equatable from the generated/public API path; generate operator == and hashCode instead
  • Better constructor and field validation diagnostics in shape_generator
  • Update examples, READMEs, root migration docs, fixtures, goldens, and test harnesses
  • Add and update tests across shape, shape_generator, and example package
  • Add changelog entries for API, generator, and internal changes

Dart 3.13 / analyzer upgrade

  • SDK constraint bumped to >=3.13.0 across all packages
  • shape_generator: analyzer bumped to >=13.3.0 <15.0.0, build to ^4.0.8
  • Migrate NamedExpression to NamedArgument API (name.label.name to name.lexeme, expression to argumentExpression)
  • Skip primary constructors during AST resolution (no ConstructorDeclaration node for those)
  • Remove Flutter 3.44 compat pins on test, build_runner, build

Remove FormBody/FormErrors generics, add @fieldrequired annotation,
support redirecting factories with auto-wrapping via GenericFormField,
and replace Equatable with explicit operator==/hashCode.
@jeroen-meijer
jeroen-meijer marked this pull request as draft August 6, 2026 11:00
@jeroen-meijer
jeroen-meijer marked this pull request as ready for review August 6, 2026 12:00
@jeroen-meijer jeroen-meijer changed the title feat: v0.1.0 - simplify form APIs and generator, upgrade dependencies feat: v0.1.0 - simplify form APIs, support Dart 3.13 + analyzer 13.x Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant