Closed Alrfati-HazemY closed 3 months ago
I've got the same issue, but using GetX as state manager. The Multidropdown is inside a Drawer, and as soon as it rebuilds I get the error mentioned above
Same for me.
I believe this happens because of the same controller being reassigned to the newly created MultiSelectDropDown
widget after being destroyed or reinserted into the widget tree.
When I do this, the error doesn't happen
controller: MultiSelectController<Benefactor>()
instead of assigning the controller as a final variable, I create them on the fly. The error disappears, but the options are limited as I cant use the controller in other parts of the code
edit: I get the dropdowncontroller disposed error if I do that; above is bs. Dont mind that;
I’m using Bloc state management, where I’ve defined the following controller
final gender = MultiSelectController<int>()
in the cubit. And I have a page with a multi-step form, and I use this controller in the first step, which works fine. However, when I click the button to proceed to the second step, I destroy the first widget and display the second usingBlocBuilder
. If I then click the back button to return to the first widget, I encounter the following error:Exception caught by foundation library
package:flutter/src/widgets/overlay.dart': Failed assertion: line 1550 pos 14: '_zOrderIndex != null': is not true.
Maybe the solution will be the same as for the previous issue before the migration to V3. PR-12