State indicating that data is being refreshed. It can occur only after
initial loading ends with Success or Empty result. It may contain
the data that has already been loaded.
ViewStateBuilder is responsible for building the UI based on the ViewState.
It's a wrapper over the BlocBuilder widget so it accepts a bloc object and
a set of handy callbacks, which corresponds to each possible state:
onReady builder for the the initial state,
onLoading builder for the data loading state,
onRefreshing builder for the data refreshing state,
onSuccess builder for the data success state,
onEmpty builder for for no result state,
onError builder function for an error state.
Signature for the buildWhen function which takes the previous ViewState
and the current ViewState and returns a bool which determines whether
to rebuild the view with the current state.
Signature for the listenWhen function which takes the previous ViewState
and the current ViewState and is responsible for returning a bool which
determines whether or not to call the listener function.