AbdulRahmanAlHamali / flutter_typeahead

A TypeAhead widget for Flutter, where you can show suggestions to users as they type
BSD 2-Clause "Simplified" License
831 stars 351 forks source link

[Bug] - Clear Suggestions Cache #588

Closed tiagomn closed 6 months ago

tiagomn commented 6 months ago

Steps to reproduce

Hi Guys, I migratted from 4x to 5x and Im getting an issue regarding suggestions cache. I know it's new feature, but for us it doesn't make sense, we already handle the code to call suggestionsCallback even when it's empty to get our default list and not the cached one. I called suggestionscontroller.refresh() when user clear the textfield but it's not working

Expected results

I suggest to have a flag if I want or not cache the values.

Actual results

Getting cache entries on suggestions but we don't want it.

Package Version

5.2.0

Platform

Android

Code sample

Code sample ```dart //Not necessary ```

Logs

Logs ```console [Paste your logs here] ```

Screenshots or Video

Screenshots / Video demonstration [Upload media here]
bzkrterdm commented 4 days ago

This problem should be considered. We prepare our own logic and do not send data, but due to the cache, the user can see the data he deleted. @tiagomn