snack_pack 1.0.2
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
Dismissiblenow uses a stable key created once, instead of a newUniqueKey()on every rebuild (prevents gesture/animation state from resetting). - Corrected
dart:asyncimport ordering and added alibrary;directive to clear analyzer hints. - Removed the
package_api_docslint (removed in Dart 3.7) fromanalysis_options.yaml. - Repaired the pub.dev example (
example/main.dart): restored corrupted$_counterstring 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 analyzeanddart formatwith 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.dartso 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 barsSnackBarTypeenum 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