Skip to content

FormBuilderDropdown assert error with initialValue  #687

Closed
@KanybekMomukeyev

Description

@KanybekMomukeyev

Hi, thanks for sharing source codes!
But FormBuilderDropdown has a serious issue, every time when i am trying to update UI with new items, i have a following issue:

assert(items == null || items.isEmpty || value == null ||
              items.where((DropdownMenuItem<T> item) {
                return item.value == value;
              }).length == 1,
                "There should be exactly one item with [DropdownButton]'s value: "
                '$value. \n'
                'Either zero or 2 or more [DropdownMenuItem]s were detected '
                'with the same value',
              ),

I have allready removed FormBuilderDropdown, and directly used with same source code DropdownButton,
everything is worked like a charm, no problem. By me the problem of FormBuilderDropdown is "initialValue"
the "initialValue" may be not updating, i will try to detail research this issue, but issue is exsists 100%.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions