Closed iCueto closed 5 years ago
Hi @iCueto 👋 Thanks for opening an issue!
I think you are missing completing the Completer
. In the weather example, we use BlocListener
to detect when the bloc has finished and then complete and reset the Completer
.
BlocListener<WeatherBloc, WeatherState>(
listener: (context, state) {
if (state is WeatherLoaded) {
BlocProvider.of<ThemeBloc>(context).dispatch(
WeatherChanged(condition: state.weather.condition),
);
_refreshCompleter?.complete();
_refreshCompleter = Completer();
}
},
...
Hope that helps 👍
Thank a lot!!! @felangel... It's Work!!!
I have missing that part... Thanks...
I've follow the instructions of the Example Weather App for the Pull to Refresh feature, and the RefreshIndicator is not hidden after its does the function and request the data.
Here is a video of the behavior: Video of the app with RefreshIndicator
As you can see My Code is something similar to the example of the WeatherApp in the part of the Refresh.
What am I doing wrong?
Thanks for the help...
Here is my Bloc.
here my provider and my repository
here my View