Custom dropdown widget allows to add highly customizable dropdown widget in your projects. Features includes Search on list data, Network search, Multi-selection and many more.
In the custom_dropdown.dart, the didUpdateWidget method changes the selectedItemNotifier and selectedItemsNotifier to a new instance when the widget configuration is inconsistent.
This causes two problems, first if the end user supplied the controller then it will be overriden. Secondly, new instance is not required, and even if created should have attached the listeners to the the new instance.
This commit solves the problem by updating the earlier instance of the notifier to the new value via SchedulerBinding. Also, the two examples have been changed to use the stateful widget, which solves the current problem.
In the custom_dropdown.dart, the didUpdateWidget method changes the selectedItemNotifier and selectedItemsNotifier to a new instance when the widget configuration is inconsistent.
This causes two problems, first if the end user supplied the controller then it will be overriden. Secondly, new instance is not required, and even if created should have attached the listeners to the the new instance.
This commit solves the problem by updating the earlier instance of the notifier to the new value via SchedulerBinding. Also, the two examples have been changed to use the stateful widget, which solves the current problem.