flutter_empty_state 0.3.0
flutter_empty_state: ^0.3.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.3.0 #
- Localization: every default string is now translatable through
EmptyStateLocalizationsand itsdelegate. Ten languages ship in the box (en, uz, ru, es, fr, de, pt, tr, ar, zh) and unlisted locales fall back to English. Works with zero setup; explicit arguments still win, andnullstill hides an element. AsyncStateView,FutureStateView,StreamStateView: drive the right state straight from anAsyncSnapshot,FutureorStream— loading, error, offline (via anoInternetWhenclassifier), "loaded but empty" (via anisEmptypredicate) and content, all from one widget.SuccessState: a positive, "you're all done" state with a check icon that defaults to the primary colour.SkeletonCardandSkeletonGrid: placeholder counterparts to a card and aGridView, both safe in unbounded-height parents.- CI: now collects coverage and uploads it to Codecov.
- Live web demo deployed to GitHub Pages from the example app.
0.2.1 #
- Docs: drop the emoji bullets from the README features list for a cleaner look.
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.
