flutter_api_state 0.0.3
flutter_api_state: ^0.0.3 copied to clipboard
A Flutter package that simplifies async UI state handling (loading, success, error, empty) with built-in retry and pull-to-refresh support.
0.0.3 #
- New: optional pre-flight connectivity check. Set
enableNetworkCheck: trueto skip the future when offline and show thenoNetworkwidget instead. Default check usesdart:ioDNS lookup on mobile/desktop; web is a no-op. Override viahasNetwork: () async => ...to plug inconnectivity_plusor your own logic. Works withenableRetry(tap to recheck) andenablePullToRefresh.
0.0.2 #
- Fix:
enablePullToRefresh: truecrashed with "RenderBox was not laid out" when the success child was an already-scrollable widget (e.g.ListView.builder). The widget no longer wraps scrollable children in aSingleChildScrollView; non-scrollable error/empty branches are wrapped in aListViewso pull still works.
0.0.1 #
- Initial release of
flutter_api_state. ApiStateBuilder<T>with loading / error / empty / success branches.EmptyDetectorfor null / empty list / map / set / string detection.- Built-in retry button (
enableRetry, optionalretryButtonBuilder). - Built-in pull-to-refresh (
enablePullToRefresh).