snackbar_cs 0.0.4
snackbar_cs: ^0.0.4 copied to clipboard
A customizable Flutter snackbar package with predefined styles for success, error, warning, and info messages.
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.
0.0.1 - 2025-08-27 #
Added #
- โจ Core Features
CSSnackbarclass with predefined snackbar types (success, error, warning, info)SnackbarTypeenum with predefined colors and iconsSnackbarConfigclass for global configuration management
- ๐จ Predefined Snackbar Types
CSSnackbar.success()- Green background with check circle iconCSSnackbar.error()- Red background with error iconCSSnackbar.warning()- Orange background with warning iconCSSnackbar.info()- Blue background with info icon
- ๐ ๏ธ Customization Options
CSSnackbar.custom()- Fully customizable snackbar with custom colors and iconsCSSnackbar.show()- Advanced snackbar with all configuration options- Global default configuration via
updateDefaultConfig()
- โ๏ธ Configuration Features
- Customizable duration (default: 3 seconds)
- Show/hide close icon (default: true)
- Show/hide type icons (default: true)
- Configurable elevation (default: 6.0)
- Custom margin and padding support
- Adjustable border radius (default: 8.0)
- Custom text styling
- Floating or fixed behavior (default: floating)
- Customizable dismiss direction (default: down)
- onVisible callback support
- ๐ฏ Action Support
SnackBarActionsupport for all snackbar types- UNDO, RETRY, and custom action buttons
- ๐ง Utility Methods
CSSnackbar.hide()- Hide current snackbarCSSnackbar.clearAll()- Clear all snackbars from queue
- ๐ฑ Responsive Design
- Text overflow handling with ellipsis
- Maximum 3 lines for long messages
- Proper icon and text spacing
- โฟ Accessibility
- Built-in accessibility support via Flutter's SnackBar widget
- Semantic labels and descriptions
- Proper color contrast ratios
- ๐งช Testing
- Comprehensive test suite with 15+ test cases
- Widget tests for all snackbar types
- Configuration and edge case testing
- Test utilities for easy testing integration
- ๐ Documentation
- Comprehensive README with examples
- Inline code documentation with Turkish comments
- API reference with parameter descriptions
- Usage examples and best practices
- ๐ง Development
- Minimum SDK requirement: Dart >=2.17.0 <4.0.0
- Flutter >=2.0.0 support for broad compatibility
- Null safety enabled
- Flutter lints for code quality
Technical Details #
- Dependencies: Only Flutter SDK (no external dependencies)
- Null Safety: Full null safety support
- Platform Support: All platforms supported by Flutter
- Performance: Lightweight implementation with minimal overhead
- Theming: Respects Material Design principles
Breaking Changes #
- None (initial release)
Migration Guide #
- This is the initial release, no migration required
Known Issues #
- None reported
Deprecated #
- None
Security #
- No security concerns identified