flutter_empty_state 0.2.0
flutter_empty_state: ^0.2.0 copied to clipboard
Lightweight, theme-aware empty, error, no-internet, search-empty and loading state widgets for Flutter. Customizable and dependency-free.
Changelog #
0.2.0 #
- Pull-to-refresh: new
onRefreshonEmptyState,ErrorState,NoInternetStateandSearchEmptyStatewraps the state in aRefreshIndicatorwith an always-scrollable viewport — pull down to reload even when there's no list on screen. - Async action buttons: action callbacks (
onAction,onRetry,onClear) now acceptFutureOr<void>. When a callback returns aFuture, the button disables itself and shows an inline progress indicator until it completes. - Secondary action: optional
secondaryActionText/onSecondaryActionrender aTextButtonunder the main action (e.g. "Retry" + "Go back"). ErrorState.details: collapsible, selectable technical details behind a "Details" disclosure — perfect for raw exception text in bug-report flows.StateView.onRetry: wires the retry button of the default error and no-internet states, soStateView(state: s, onRetry: _load, child: ...)is a complete screen.StateView.transitionBuilder: customise the transition between states (same contract asAnimatedSwitcher.transitionBuilder).SkeletonParagraph: a text-block placeholder with a shorter last line.SkeletonListnow works inside unbounded-height parents (aColumn, another scrollable) instead of throwing.- The shimmer sweep follows the ambient text direction (RTL support).
EmptyStateThemegainssecondaryButtonStyle,skeletonBaseColorandskeletonHighlightColor.
0.1.2 #
- Declare supported platforms (Android, iOS, web, Windows, macOS, Linux) explicitly so pub.dev lists them.
0.1.1 #
- Fix the preview screenshots not showing on the pub.dev README (use absolute image URLs instead of relative paths).
0.1.0 #
First release.
EmptyState,ErrorState,NoInternetState,SearchEmptyStateandLoadingState.StateView+ViewStateto switch between loading / empty / error / offline / content from a single value, with a cross-fade between states.EmptyStateTheme(aThemeExtension) to set your defaults once for the whole app. Resolution order is explicit argument → theme → built-in default.- Theme-aware defaults with full light & dark support.
- Subtle fade + slide entrance animation that honours the OS "reduce motion" setting; fully opt-out.
SkeletonList, plusShimmerandSkeletonprimitives, for a shimmer-based loading placeholder.- Accessibility: real text widgets, decorative icons, and a live region on the loading state.
- Everything is overridable: icon, custom illustration, title, message, action button, icon size, spacing, padding, max content width, text alignment, and the text / button styles.
debugFillPropertieson every widget for a friendlier DevTools inspector.- No runtime dependencies.