Mindinventory / drop_down_list

Highly versatile Widget to search through a single or multiple choices from bottom sheet list in a dialog box or a menu.
https://www.mindinventory.com/flutter-app-development.php
MIT License
75 stars 32 forks source link

Use SelectedListItem as argument in listItemBuilder instead of index #17

Closed MrLightful closed 7 months ago

MrLightful commented 1 year ago

Closes #16

This PR replaces the parameter in ListItemBuilder function with SelectedListItem, instead of integer index.

The reason is that if the search is used, it produces a subset list that has no longer valid indexes for matching it with the original list. So it's impossible to customize the rendering of the items for searched items.

So as we replace an arbitrary index with SelectedListItem, we now have SelectedListItem.value which can be used to match the item in the original list, and thus use this data to render a custom widget.

The change can be considered breaking, but it is absolutely crucial, so to make it work with the search.

MrLightful commented 1 year ago

@deep-mindinventory?

MrLightful commented 9 months ago

@mi-raj04 please consider merging this. It is really important. The search feature is otherwise unusable.

MrLightful commented 3 months ago

@pratikkansaramind @deep-mindinventory can you please consider releasing? It's been merged for months now, but still isn't in the release.

MrLightful commented 3 months ago

@abrarmalekji345?

abrarmalekji345 commented 3 months ago

@romatallinn Ok will do Asap