Why doesn’t the Autocomplete widget update the suggestions when rebuilt?
I’m trying to build a search bar where the user can look up for a place, and select a suggestion corresponding on what caracters they wrote.
I’m using BLOC, and an API to fetch the suggestions from the string the user wrote. The widget that I use to display the suggestion is ‘Autocomplete’.
My problem is that this Autocompletion widget doesn’t rebuild the suggestions, while the blocbuilder (parent of ‘Autocompletion’) is properly rebuilt.
music unexpectedly play when app is close | Flutter
i have an application and i play music for user while using it.
so i handle when user is not in resuming mode the song should stop. it works very fine but i found a bug.
the bug is when i minimize the app and go to some app like Instagram and see a reels when tap the home screen and suddenly the music play. but my AppLifecycleState
doesn’t change.
this is my code :
why blocprovider is not updating the state of the ui?
I am making an infinite scroll view in flutter with bloc state management, the issue is that my state is not updating when I go to the bottom of the screen, I noticed that when I call the ..add(FetchAllProductEvent) function in the blocprovider it is fetching me the initial products, but when i call it in the onscroll function it is not updating the ui, as I can also see the logs that the onscroll function is called properly and the API calls have been made. But my blocbuilder is not reacting to the states. also, when I call it in, initstate state is not even working for initial products.