snack_pack 1.0.2 copy "snack_pack: ^1.0.2" to clipboard
snack_pack: ^1.0.2 copied to clipboard

A beautiful and customizable animated snack bar package for Flutter. Display top-aligned snack bars with smooth animations and swipe-to-dismiss functionality.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

1.0.2 - 2026-06-26 #

Fixed #

  • The swipe-to-dismiss Dismissible now uses a stable key created once, instead of a new UniqueKey() on every rebuild (prevents gesture/animation state from resetting).
  • Corrected dart:async import ordering and added a library; directive to clear analyzer hints.
  • Removed the package_api_docs lint (removed in Dart 3.7) from analysis_options.yaml.
  • Repaired the pub.dev example (example/main.dart): restored corrupted $_counter string interpolation that had been replaced by a stray control character.
  • Replaced the stale default counter smoke test in the example with real tests covering the demo.

Changed #

  • Added a comprehensive widget test suite — rendering/type correctness, animation & lifecycle, edge cases & safety, and responsive layout/API contracts — reaching 100% line coverage of the library. The project now passes flutter analyze and dart format with zero issues.

1.0.1 - 2025-10-30 #

Fixed #

  • Fixed timer disposal logic in the snack bar auto-dismiss. Cancels timers on widget disposal. Prevents test and runtime disposal/pending timer errors.
  • Improved test reliability: All widget tests now pass and are robust for overlays/animations.

Improved #

  • Example is now at example/main.dart so the Example section appears on pub.dev.
  • CI/CD and publishing workflow clarification.

1.0.0 - 2025-10-29 #

Added #

  • Initial release of Snack Pack
  • Four built-in snack bar types: success, failure, warning, and info
  • Smooth slide-in and slide-out animations
  • Swipe-to-dismiss functionality
  • Auto-dismiss with customizable duration
  • Smart queue management (only one snack bar visible at a time)
  • Safe area awareness for device notches and status bars
  • Comprehensive documentation and examples
  • Full platform support (Android, iOS, Web, macOS, Windows, Linux)

Features #

  • showCustomSnackBar() function for easy display of snack bars
  • SnackBarType enum with four distinct types
  • Customizable duration parameter
  • Material Design-inspired UI with elevation and rounded corners
  • Type-specific icons and colors
  • Responsive layout that adapts to screen width

Documentation #

  • Complete README with usage examples
  • API reference documentation
  • In-code documentation for all public APIs
  • Example application demonstrating all features
1
likes
150
points
13
downloads

Documentation

API reference

Publisher

verified publisherdhirajnikam.dev

Weekly Downloads

A beautiful and customizable animated snack bar package for Flutter. Display top-aligned snack bars with smooth animations and swipe-to-dismiss functionality.

Repository (GitHub)
View/report issues
Contributing

License

MIT (license)

Dependencies

flutter

More

Packages that depend on snack_pack