snacktoast 0.1.0
snacktoast: ^0.1.0 copied to clipboard
A production-ready Flutter package for customizable Toast messages and Snackbars with queue management, theming, and zero-dependency design.
Changelog #
All notable changes to this project will be documented in this file.
The format follows Keep a Changelog. This project adheres to Semantic Versioning.
0.1.0 — 2026-06-16 #
This release is a major feature drop — 6 new signature animation styles, inline action buttons for both toast and snackbar, a priority queue, full accessibility support, haptic feedback, and critical bug fixes including the yellow underline regression on all toast and custom widget text.
Added #
6 New Signature Animation Styles (24 total, was 18)
elasticBand— rises from below with X-axis rubber-band pinch-and-release.glitchReveal— rapid opacity flicker with horizontal jitter; digital/cyberpunk entrance.gravityDrop— falls from above withCurves.bounceOutgravity physics; physically heavy feel.spiralIn— rotates ~16° while scaling from 55%; premium spiral entrance for confirmations.wipeReveal— left-to-rightClipRectcurtain wipe with no opacity fade; pure cinematic reveal.neonFlare— scales in from 78% with three concentric neon rings expanding outward.
Action Button — Toast
actionLabel,onAction,actionColorparameters added toSnackToastKit.toast().- Also available on all convenience methods:
success(),error(),warning(),info(). - Action button rendered inline, right-aligned inside the toast card.
- Fires
HapticFeedback.lightImpact()on tap (whenhapticFeedbackis enabled). - Toast dismisses automatically after the action is triggered.
Action Button — Snackbar
actionLabel,onAction,actionColorparameters added toSnackToastKit.snackbar().- Also available on convenience snackbar methods.
- Builds a themed
SnackBarActionautomatically — foreground color follows the visual style. - Explicit
action: SnackBarActionstill supported and takes precedence.
Priority Queue
- New
SnackToastPriorityenum:normal|high. priority: SnackToastPriority.highinserts the toast immediately after the currently-running notification instead of at the end of the queue.error()defaults toSnackToastPriority.high— critical errors no longer wait behind an info burst.
Accessibility
- All toast notifications now wrapped in
Semantics(liveRegion: true). labelis set to"$title: $message"(or justmessagewhen no title).- Screen readers (TalkBack, VoiceOver) announce toasts as they appear.
Haptic Feedback
- New
hapticFeedbackfield onSnackToastConfig(defaulttrue). - Fires
HapticFeedback.lightImpact()on swipe-dismiss and action button tap. - Disable globally via
SnackToastConfig(hapticFeedback: false).
Snackbar Visual Parity
glassstyle snackbar now renders with a realBackdropFilterblur — matches toast glass style.gradientstyle snackbar now renders with the same 3-stopLinearGradientas the toast.- Both styles set
SnackBar.backgroundColorto transparent and handle the decoration in content.
onTap Callback — Toast
- New
onTap: VoidCallback?parameter onSnackToastKit.toast(). - Fires on tap independently of
dismissOnTap— allows navigation or custom logic without losing dismiss control.
Fixed #
-
Yellow underline on toast text —
Textwidgets insideToastWidgetnow explicitly setdecoration: TextDecoration.none, decorationColor: Colors.transparenton everyTextStyle.copyWith()call. Flutter'sOverlayinjects aDefaultTextStylewithTextDecoration.underline(yellow); this override fully suppresses it. -
Yellow underline on custom widget toast —
_buildCard()now wraps anycustomWidgetin aDefaultTextStyle(decoration: TextDecoration.none)before rendering. This protects all user-supplied custom widgets automatically with no code changes required from consumers. -
Swipe snap-back teleport — when a swipe does not cross the dismiss threshold, the card no longer jumps instantly back to position. It now animates back with
Curves.elasticOutvia a dedicatedAnimationControllerin_ToastWidgetState. -
Text overflow on long messages —
messagenow hasmaxLines: 4andoverflow: TextOverflow.ellipsis;titlehasmaxLines: 2. Applies to both toast and snackbar content widgets. -
dynamictype onvisualStyleOverride—ToastController,ToastOverlayHost, andToastWidgetnow correctly typevisualStyleOverrideasSnackToastVisualStyle?instead ofdynamic.
Changed #
error()convenience method now defaults topriority: SnackToastPriority.high.SnackToastAnimation.values.lengthis now 24 (was 18).requiresRadialLayeris nowtruefor bothradialExpansionandneonFlare.- Example app — new "Signature — v3" animation family section showcasing all 6 new animation styles with appropriate positions and semantic types.
0.0.5 — 2026-04-28 #
Fixed #
- Snackbar text underline — Removed unwanted underline decoration appearing on title and message text.
0.0.3 — 2026-04-28 #
Fixed #
- Snackbar text underline — Removed unwanted underline decoration
appearing on title and message text in all
SnackToastKit.snackbar()calls. Flutter'sSnackBarinjects aDefaultTextStylewithTextDecoration.underlineinto its content subtree; both text styles in_SnackBarContentnow explicitly setdecoration: TextDecoration.noneto override it. Toast notifications are unaffected.
0.0.2 — 2026-03-11 #
This release focuses on improving documentation and cleaning up the package presentation for a better user experience and higher pub.dev score.
Changed #
- Improved overall package documentation score by adding comprehensive dartdoc comments to all public API elements (classes, methods, fields, and enums).
- Removed Testing and Architecture sections from
README.mdto streamline the documentation. - Ensured 100% of the public API is documented.
0.0.1 — 2026-03-09 #
Initial release of SnackToastKit.
This release introduces a customizable toast and snackbar system for Flutter featuring modern animations, configurable visual styles, swipe gestures, progress indicators, and a queue-based display system.
Added #
Core System
-
SnackToastKitstatic API providing:toast()for overlay toastssnackbar()forScaffoldMessengersnackbars- convenience helpers:
success(),error(),warning(),info()
-
SnackToastConfigimmutable global configuration withcopyWith()support. -
SnackToastTypeenumsuccess | error | warning | info | custom -
SnackToastPositionenumtop | center | bottom
Animation System
-
SnackToastAnimationenum supporting multiple entrance animations:slideUpslideDownslideLeftslideRightfadescaleSpringbounceUpflipReveal
-
SnackToastAnimationResolverextension providing:entranceCurveexitCurveresolvedEntranceDuration(Duration)
-
Automatic animation selection based on toast position when no animation style is specified.
Visual Style System
-
SnackToastVisualStyleenum providing multiple rendering modes:standard— elevated card with layered shadowsglass— frosted blur card usingBackdropFiltergradient— rich multi-stop gradient backgroundminimal— clean white card with accent baroutlined— transparent card with glowing border
Gesture Interaction
- Swipe-to-dismiss support for toast notifications.
- Configurable dismiss threshold using distance or velocity.
- Smooth snap-back animation when dismissal conditions are not met.
Progress Indicator
- Optional animated progress bar showing toast duration.
- Automatically drains over the toast lifetime.
- Configurable height and visibility.
Icon Micro-Animation
- Elastic entrance animation for toast icons.
- Staggered animation timing for more natural UI feedback.
Queue System
SnackToastQueueFIFO queue ensuring sequential toast display.- Configurable
maxQueueSizeto prevent excessive stacking.
Overlay Architecture
ToastOverlayHostwidget providingTickerProviderfor toast animations.ToastControllermanaging toast lifecycle, animations, and dismissal.
Snackbar Integration
SnackToastSnackbarwrapper aroundScaffoldMessenger.- Supports consistent styling between toast and snackbar components.
Global Key Support
SnackToastKit.navigatorKeySnackToastKit.scaffoldMessengerKey
Allows displaying notifications without requiring a BuildContext.
Developer Utilities
SnackToastKit.reset()for clearing configuration and queues during tests.SnackToastKit.dismissAll()to programmatically remove active toasts.
This release establishes the base architecture and public API for SnackToastKit, enabling flexible toast and snackbar notifications across Flutter applications.