Hello,
I'm trying to clear / reset a dropdown field by using setAttributeValue, but it does not change in UI, further more I can't clear the dropdown value as I can't use controller attribute.
My issue is I have to tow linked dropdown fields and while the user select a value from the second dropdown and then change the first dropdown I got following issue:
โโโโโโโโ Exception Caught By widgets library โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
The following assertion was thrown building FormField
'package:flutter/src/material/dropdown.dart': Failed assertion: line 608 pos 15: 'items == null || items.isEmpty || value == null || items.where((DropdownMenuItem
Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
https://github.com/flutter/flutter/issues/new?template=BUG.md
When the exception was thrown, this was the stack:
...
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
I understand this is Material dropdown library issue, but I figure out if I reset the form just after I return the list from the API based on first dropdown value the issue is not there.. but this does not the solution for it as on every change on first dropdown it will reset every thing.
I saw one of the issues and the workaround was to add controller but can't do the same in FormBuilderDropdown.
Please help me.
Thanks in advance.
Support Sucks here!!! Closing... for no support!