snacktoast 0.1.0 copy "snacktoast: ^0.1.0" to clipboard
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 with Curves.bounceOut gravity physics; physically heavy feel.
  • spiralIn — rotates ~16° while scaling from 55%; premium spiral entrance for confirmations.
  • wipeReveal — left-to-right ClipRect curtain 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, actionColor parameters added to SnackToastKit.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 (when hapticFeedback is enabled).
  • Toast dismisses automatically after the action is triggered.

Action Button — Snackbar

  • actionLabel, onAction, actionColor parameters added to SnackToastKit.snackbar().
  • Also available on convenience snackbar methods.
  • Builds a themed SnackBarAction automatically — foreground color follows the visual style.
  • Explicit action: SnackBarAction still supported and takes precedence.

Priority Queue

  • New SnackToastPriority enum: normal | high.
  • priority: SnackToastPriority.high inserts the toast immediately after the currently-running notification instead of at the end of the queue.
  • error() defaults to SnackToastPriority.high — critical errors no longer wait behind an info burst.

Accessibility

  • All toast notifications now wrapped in Semantics(liveRegion: true).
  • label is set to "$title: $message" (or just message when no title).
  • Screen readers (TalkBack, VoiceOver) announce toasts as they appear.

Haptic Feedback

  • New hapticFeedback field on SnackToastConfig (default true).
  • Fires HapticFeedback.lightImpact() on swipe-dismiss and action button tap.
  • Disable globally via SnackToastConfig(hapticFeedback: false).

Snackbar Visual Parity

  • glass style snackbar now renders with a real BackdropFilter blur — matches toast glass style.
  • gradient style snackbar now renders with the same 3-stop LinearGradient as the toast.
  • Both styles set SnackBar.backgroundColor to transparent and handle the decoration in content.

onTap Callback — Toast

  • New onTap: VoidCallback? parameter on SnackToastKit.toast().
  • Fires on tap independently of dismissOnTap — allows navigation or custom logic without losing dismiss control.

Fixed #

  • Yellow underline on toast textText widgets inside ToastWidget now explicitly set decoration: TextDecoration.none, decorationColor: Colors.transparent on every TextStyle.copyWith() call. Flutter's Overlay injects a DefaultTextStyle with TextDecoration.underline (yellow); this override fully suppresses it.

  • Yellow underline on custom widget toast_buildCard() now wraps any customWidget in a DefaultTextStyle(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.elasticOut via a dedicated AnimationController in _ToastWidgetState.

  • Text overflow on long messagesmessage now has maxLines: 4 and overflow: TextOverflow.ellipsis; title has maxLines: 2. Applies to both toast and snackbar content widgets.

  • dynamic type on visualStyleOverrideToastController, ToastOverlayHost, and ToastWidget now correctly type visualStyleOverride as SnackToastVisualStyle? instead of dynamic.

Changed #

  • error() convenience method now defaults to priority: SnackToastPriority.high.
  • SnackToastAnimation.values.length is now 24 (was 18).
  • requiresRadialLayer is now true for both radialExpansion and neonFlare.
  • 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.4 — 2026-04-28 #

Fixed #

  • Minor bug fixes and improvements.

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's SnackBar injects a DefaultTextStyle with TextDecoration.underline into its content subtree; both text styles in _SnackBarContent now explicitly set decoration: TextDecoration.none to 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.md to 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

  • SnackToastKit static API providing:

    • toast() for overlay toasts
    • snackbar() for ScaffoldMessenger snackbars
    • convenience helpers: success(), error(), warning(), info()
  • SnackToastConfig immutable global configuration with copyWith() support.

  • SnackToastType enum success | error | warning | info | custom

  • SnackToastPosition enum top | center | bottom

Animation System

  • SnackToastAnimation enum supporting multiple entrance animations:

    • slideUp
    • slideDown
    • slideLeft
    • slideRight
    • fade
    • scaleSpring
    • bounceUp
    • flipReveal
  • SnackToastAnimationResolver extension providing:

    • entranceCurve
    • exitCurve
    • resolvedEntranceDuration(Duration)
  • Automatic animation selection based on toast position when no animation style is specified.

Visual Style System

  • SnackToastVisualStyle enum providing multiple rendering modes:

    • standard — elevated card with layered shadows
    • glass — frosted blur card using BackdropFilter
    • gradient — rich multi-stop gradient background
    • minimal — clean white card with accent bar
    • outlined — 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

  • SnackToastQueue FIFO queue ensuring sequential toast display.
  • Configurable maxQueueSize to prevent excessive stacking.

Overlay Architecture

  • ToastOverlayHost widget providing TickerProvider for toast animations.
  • ToastController managing toast lifecycle, animations, and dismissal.

Snackbar Integration

  • SnackToastSnackbar wrapper around ScaffoldMessenger.
  • Supports consistent styling between toast and snackbar components.

Global Key Support

  • SnackToastKit.navigatorKey
  • SnackToastKit.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.

4
likes
160
points
103
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A production-ready Flutter package for customizable Toast messages and Snackbars with queue management, theming, and zero-dependency design.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on snacktoast