Closed colinbes closed 2 months ago
Challenge was I was thinking that for onTap item I was providing the onTap function, whereas in itemBuilder: (DropdownItem<int> item, int index, onTap) {}
the onTap is a callback that you call in your itemBuilder.
Can you please explain how to use itemBuilder as there is no description of it's usage.
I assume by setting itemBuilder I can use my own ListTile to show my drop down choice in displayed MultiDropdown items list.
If I add my own itemBuilder void callback then it appears that I have to provide my own
MultiSelectController
- is this correct.If above is correct then I would have to use onTap callback with itemBuilder and this is where I am totally lost as I am unable to add my own callback. Also not sure what concept was as item or at very least item's index would need to be provided to callback to know what item was clicked on.
I have tried:
and in MultiDropdown I have
I suspect () => itemTapped(item) is not valid but don't see how one would pass item or index as onTap is defined as Function() with no parameters.
Once I get this working I am happy to assist with updating documentation