fetching_state 3.0.0
fetching_state: ^3.0.0 copied to clipboard
A small package that helps easily to work with UI changes base on the state of fetching remote data
3.0.0 #
- remove
mapmethods - remove
flutterdependency - add [LoadingState] which is similar to [FetchingState] but without
data. Use when you don't need to attach a data object in to the [FetchingState]
2.0.3 #
- small fixes
2.0.2 #
- in [FetchingState] make
T? dataoptional.
2.0.1 #
- update example and documents
2.0.0 #
- Add
LoadStatusmixin. A mixin to use with classes that have to do with loading status. - This mixin will attach
loadStatusattribute into that class along with it are many helper methods for easily checking and setting currentloadStatus. - There are also helper methods to render widget or perform action base on current
loadStatus(when, whenOrElse, map, mapOrElse)
1.2.0 [BREAKING CHANGE] #
- For better use with null-safety, [T] data is now required. Users can set it to nullable
- With the change above, the following constructors are removed:
FetchingState.loading()FetchingState.done([T? data])FetchingState.error([Object? error])
1.1.1 #
- Fixed typo and methods
1.1.0 [BREAKING CHANGE] #
- No longer require [E] Error type. By default error type to [Object], which later can be cast to your own sake.
- Added
loadingMorestate where user could you when fetching more item into current data. Useful when use with ListView, ect... onDoneis now(T? data, bool isLoadingMore)which provide current [data] and a boolean value indicate if the [status] is [loadingMore] add the same time. This help user can still display current list and the loading indicator if fetching more data is happening.
1.0.1 #
- Add optional init parameters for
initmethod
1.0.0 #
- Remove named parameters
- Fix typos
0.0.8 #
whenOrElseandwhenreturn WidgetsmapOrElseandmapreturn whatever type you want.
0.0.7 #
- change to make return type more flexible.
- return Widget is not the case anymore.
0.0.6 #
- changing [
isDone,isInit,isLoading,isError] to getters
0.0.5 #
- adding bool shortcut methods [
isDone,isInit,isLoading,isError]
0.0.4 #
0.0.3 #
- update documents
0.0.2 #
- update license
0.0.1 #
- First publish