Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: #1350 valueTransformer transform values to null #1423

Merged

Conversation

BrottarBasse
Copy link
Contributor

Fix for issue 1350 with some changes to tests. This fix makes it so that valueTransformer can transform values to null.

Connection with issue(s)

Close #1350

Connected to #???

Solution description

Changes to implementation of value transformer so that it is still used if value is transformed to null.
I also found that the tests also had flipped values in the expect functions (actual and matcher was wrong way around)

Screenshots or Videos

To Do

  • [ x] Read contributing guide
  • [ x] Check the original issue to confirm it is fully satisfied
  • [ x] Add solution description to help guide reviewers
  • [ x] Add unit test to verify new or fixed behaviour
  • [ x] If apply, add documentation to code properties and package readme

…hat valueTransformer can transform values to null.
@deandreamatias deandreamatias changed the title Fix for issue 1350 with some changes to tests. fix: #1350 with some changes to tests. Sep 10, 2024
@deandreamatias deandreamatias changed the title fix: #1350 with some changes to tests. fix: #1350 valueTransformer transform values to null Sep 10, 2024
@deandreamatias
Copy link
Collaborator

HI @BrottarBasse please resolve pipeline errors (format form_builder.dart) to could be merge

@BrottarBasse
Copy link
Contributor Author

HI @BrottarBasse please resolve pipeline errors (format form_builder.dart) to could be merge

Since my fix contains changes to form_builder_field.dart the checks fail.

@deandreamatias
Copy link
Collaborator

HI @BrottarBasse please resolve pipeline errors (format form_builder.dart) to could be merge

Since my fix contains changes to form_builder_field.dart the checks fail.

Use the command dart format . to format all files and solve the error

Copy link

codecov bot commented Sep 16, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 87.82%. Comparing base (6ed0144) to head (d6fa69a).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
lib/src/form_builder_field.dart 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1423      +/-   ##
==========================================
- Coverage   87.90%   87.82%   -0.09%     
==========================================
  Files          21       21              
  Lines         769      772       +3     
==========================================
+ Hits          676      678       +2     
- Misses         93       94       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@deandreamatias deandreamatias merged commit 70968df into flutter-form-builder-ecosystem:main Sep 17, 2024
4 of 6 checks passed
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.

FormBuilderTextField sets field state to '' even though transformer sets return to null
2 participants