snackbarx 1.0.1
snackbarx: ^1.0.1 copied to clipboard
A lightweight, customizable Flutter package for displaying themed snackbars anywhere in your app without requiring BuildContext.
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.0 - 2024-06-01 #
1.0.1 - 2024-06-01 #
- Updated Readme.
Added #
- Initial release of SnackbarX package
- Support for three snackbar types: success, error, and info
- Multiple positioning options: top, center, and bottom
- Four animation types: slideUp, fade, scale, and slideAndFade
- Highly customizable configuration system
- Action button support for interactive snackbars
- Close button functionality
- Singleton manager pattern for reliable state management
- Memory-efficient resource cleanup
- Safe area awareness for modern devices
- Comprehensive documentation and examples
Features #
-
Core Functionality
SnackbarX.showSuccess()
- Display success messagesSnackbarX.showError()
- Display error messagesSnackbarX.showInfo()
- Display informational messagesSnackbarX.show()
- Generic method for custom typesSnackbarX.init()
- Initialize the snackbar systemSnackbarX.dismiss()
- Programmatically dismiss snackbars
-
Customization Options
- Custom background and text colors
- Custom icons and icon colors
- Configurable border radius and elevation
- Adjustable padding and margins
- Duration control for auto-dismiss
- Maximum and minimum width constraints
-
Animation System
- Smooth slide transitions from any edge
- Fade in/out effects
- Scale animations for modern feel
- Combined slide and fade animations
- Configurable animation duration and curves
-
Interactive Elements
- Action buttons with custom labels and callbacks
- Close buttons for manual dismissal
- Touch-friendly button sizing
- Accessible button constraints
-
Technical Features
- Overlay-based rendering system
- Navigator key integration
- TickerProvider support for smooth animations
- Proper animation controller lifecycle management
- Memory leak prevention through resource cleanup
- Error handling for edge cases
Dependencies #
- Flutter SDK: >=3.0.0
- Dart SDK: >=2.17.0 <4.0.0
Documentation #
- Complete README with installation and usage instructions
- API reference documentation
- Troubleshooting guide
- Best practices recommendations
- Example application demonstrating all features
Example Application #
- Comprehensive demo showcasing all snackbar types
- Animation examples for each available type
- Positioning demonstrations
- Interactive element examples
- Custom styling demonstrations