[FormBuilderTypeAhead]: Calls dispose on the TextEditingController even when it is passed in #113
Open
2 of 7 tasks
Labels
bug
Something isn't working
Is there an existing issue for this?
Package/Plugin version
10.1.0
Platforms
Flutter doctor
Flutter doctor
Minimal code example
Code sample
Current Behavior
When I call a dispose on a controller I have created, and pass it to a FormBuilderTypeAhead, it throws a:
Expected Behavior
I expect the FormBuilderTypeAhead widget to dispose the controllers it created itself, and not to dispose the controller created outside of it.
Steps To Reproduce
Aditional information
A way to fix this problem is using the same validation that FormBuilderTextField uses:
Disposing the controller only when initState creates it. Currently it disposes anyway:
The text was updated successfully, but these errors were encountered: