fetching_state library

A small package that helps easily to work with UI changes base on the state of fetching remote data

Classes

FetchingState<T>
FetchingState allow you to handle UI base on the current state of data fetching Use this one when you want to attach your data object into the state. call FetchingState.data to get your object data
LoadingState
LoadingState allow you to handle UI base on the current state of data fetching unlike FetchingState this class doesn't required a data object for use when you just want to track the state of a fetching job

Mixins

LoadStatusMixin
A mixin to use with classes that have to do with loading status. This mixin will attach loadStatus attribute into that class along with it are many helper methods for easily checking and setting current loadStatus. There are also helper methods to render widget or perform action base on current loadStatus (when, whenOrElse, map, mapOrElse)