fluent_bar 1.0.0
fluent_bar: ^1.0.0 copied to clipboard
Powerful snackbar library for Flutter supporting smart queues, deduplication, pause on touch, Future actions with auto-loaders, and comprehensive analytics.
1.0.0 #
Initial release.
- Bars shown in an overlay above the navigator:
FluentBarScope,FluentBarObserveror a navigator key. NoBuildContextneeded. - Three ways to show a bar: one-liners (
FluentBar.showSuccess), a chain (FluentBar.info(...).withTitle(...).show()), and a fullFluentBar.show. - Presets:
snack,toast,banner,loading. - Two regions (top and bottom) with their own queues, priorities, forced bars and queue strategies (
smart,fifo,lifo, custom). - Duplicate policies (
update,updateAndResetTimer,ignore,allow) and a custom duplicate comparator. - Live updates of a visible bar through its controller, its entry (texts, look, behavior, duration with
updateDuration,addDuration,subtractDuration), or a re-show with the same id; relocation between regions with a strategy. - Progress: linear and circular indicators, value / fraction / bytes / indeterminate states, complete / fail / cancel outcomes,
FluentBar.future. - Actions with async handlers, a loader on the button and throttling;
analyticsNamegives a button a stable key in analytics (action_name). - An optional close button:
.withCloseButton(),FluentBarType.showCloseButton,FluentBarConfig.defaultShowCloseButton, styled by the theme, its icon set by the bar, the type (FluentBarType.closeIcon) or the theme, andFluentBarCloseButtonfor custom content. - Themes:
material,cupertino,windows,minimal,modern,liquidGlass,copyWith, and custom themes. Types: built-in,copyWith, custom, and globaltypeOverrides. - One resolution order for every setting: the bar, then its type, then
FluentBarConfig. - Builders for content, position, transition, attention effect, progress indicator, label and action.
FluentBarTopInsetandFluentBarBottomInset; bottom bars stay above the on-screen keyboard.- Getters on
FluentBarLifecycleState(isQueued,isShowing,isVisible,isHiding,isDismissed,isOnScreen,isInteractive,isAnimating,isFinished) and onFluentBarAnalyticsEvent(isLifecycle,isInteraction,isProgress,isRejected,isCountdown,hasMetrics) and onFluentBarDismissReason(isByUser,isByCode,isAutomatic) and onFluentBarErrorSeverity(isWarning,isError). - Tags:
.withTag(),FluentBar.closeTag(),FluentBar.findByTag()and theFluentBarOwnerwidget, which closes the bars of a screen when it leaves the tree. .withCancelButton(): a Cancel action for a bar with progress, with the loader, the cancellation and the clean-up built in;FluentBarActions.removeWhenProgressEndsfor your own buttons.failProgress(retryLabel:, onRetry:)offers a second try on the same bar; with only one of the two the bar fails without a Retry button and aninvalidCallwarning is reported.- The dismiss gesture of a screen reader closes a bar with its own reason,
FluentBarDismissReason.accessibility. - Analytics events and per-bar metrics; error handlers with isolation of user callbacks, builders, themes and types. Nothing is thrown back at the caller: a call with arguments that do not fit together is reported as
FluentBarErrorType.invalidCalland takes the safe way. - Accessibility:
FluentBarSemantics(announce,quiet,hidden) on the bar (.withSemantics()), the type and the config; progress values are not read out on every update; live region for screen readers, system "reduce motion" support, pause on touch. - A guide for AI coding assistants that ships with the package:
AI_GUIDE.md(rules and an index), one topic per file indoc/ai/,doc/ai/migrations.mdfor renamed API, a pointer forAGENTS.mdinai/AGENTS.md, andllms.txt.
