toastr_flutter 1.0.0+3 copy "toastr_flutter: ^1.0.0+3" to clipboard
toastr_flutter: ^1.0.0+3 copied to clipboard

A highly customizable Flutter package for displaying beautiful toast notifications with animations, multiple types, and flexible positioning.

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+3 - 2025-09-03 #

Added #

  • ๐Ÿš€ Smart Auto-Initialization: Package now works "plug and play" without manual setup
    • Automatically detects and initializes with available Overlay context
    • Lightweight detection methods that don't consume excessive resources
    • Intelligent fallback mechanisms for different app architectures
  • ๐Ÿง  Smart Toast Detection: New ToastrHelper.show() method with automatic type detection
    • Analyzes message content to determine appropriate toast type (success, error, warning, info)
    • Simplifies usage: ToastrHelper.show('Success!') automatically shows green success toast
  • ๐Ÿ“ฑ Mobile-Optimized Performance: Designed specifically for mobile device efficiency
    • Maximum 3 auto-initialization attempts to prevent resource drain
    • Cached failure states to avoid repeated expensive operations
    • Automatic cleanup of invalid overlay states

Enhanced #

  • ๐Ÿ”’ Advanced Security Features:
    • Validation of overlay mounting state before initialization
    • Resource consumption limits to prevent memory leaks
    • Health check system for service state monitoring
    • Automatic cleanup of expired or invalid notification states
  • โšก Performance Optimizations:
    • Lightweight context detection (no expensive widget tree traversal)
    • Failed initialization caching to prevent repeated attempts
    • Smart overlay validation with automatic recovery
    • Reduced memory footprint for background processes
  • ๐Ÿ›ก๏ธ Enhanced Error Handling:
    • More descriptive error messages with troubleshooting guidance
    • Graceful degradation when auto-initialization fails
    • Automatic recovery from overlay state changes

Technical Improvements #

  • Added isHealthy getter for service state monitoring
  • Implemented dispose() method for proper resource cleanup
  • Enhanced overlay state validation with mounting checks
  • Added resetAutoInitialization() for manual reset capability
  • Optimized security validations to reduce unnecessary computations
  • Improved CupertinoApp support alongside MaterialApp

Breaking Changes #

  • None (fully backward compatible)

Usage Examples #

// New simplified usage (auto-detects type)
ToastrHelper.show('Operation completed successfully!'); // Shows success toast
ToastrHelper.show('An error occurred'); // Shows error toast

// Traditional usage (still supported)
ToastrHelper.success('Success message');
ToastrHelper.error('Error message');

1.0.0+2 - 2025-09-03 #

Fixed #

  • ๐Ÿ› Error notification issue: Fixed ArgumentError exception when showing error notifications
    • Removed invalid default duration of 0 seconds that violated minimum duration security constraint
    • Error notifications now properly inherit the default duration (5 seconds) when not specified
  • ๐Ÿ”’ Security validation: Enhanced duration validation to prevent configurations below minimum threshold (100ms)
  • ๐Ÿ“ Code documentation: Added comprehensive documentation for all public members to eliminate warnings
  • ๐Ÿ› ๏ธ Parameter ordering: Fixed constructor parameter ordering to follow Flutter conventions (required parameters first)

Enhanced #

  • ๐Ÿ“š Complete API documentation: All public classes, methods, and properties now have detailed documentation
  • ๐Ÿงน Code quality improvements:
    • Replaced print statements with debugPrint for better production behavior
    • Enhanced exception handling with specific exception types
    • Improved code organization and formatting
  • โœ… Zero analysis warnings: Achieved clean code analysis with no warnings or issues
  • ๐ŸŽฏ Better developer experience: Improved IntelliSense and documentation tooltips in IDEs

Technical Improvements #

  • Enhanced ToastrHelper.error() method to use proper default duration
  • Improved security validation in ToastrValidator with better error messaging
  • Added proper imports for Flutter foundation framework
  • Refined enum documentation for better API clarity

1.0.0+1 - 2025-09-02 #

Added #

  • ๐Ÿ“ฑ Responsive design support: Optimized layouts for mobile, tablet, and desktop devices
  • ๐ŸŽฏ Device-specific sizing:
    • Mobile: Compact layout with appropriate touch targets
    • Tablet: Medium-sized notifications with enhanced readability
    • Desktop: Larger notifications with increased text and icon sizes
  • ๐Ÿ”ง Smart layout adjustments:
    • Dynamic width constraints based on screen size
    • Responsive margins and padding
    • Scalable font sizes for better readability
    • Adaptive icon sizes (20px mobile, 24px tablet, 26px desktop)
    • Responsive close button sizing

Enhanced #

  • ๐ŸŽจ Improved visual hierarchy: Better text scaling across different devices
  • ๐Ÿ“ Adaptive spacing: Container padding and margins adjust based on screen size
  • ๐ŸŽฏ Better touch targets: Larger interactive elements on mobile devices
  • ๐Ÿ–ฅ๏ธ Desktop optimization: Enhanced hover effects and larger content for desktop users

Technical Improvements #

  • Added ResponsiveDimensions class for better dimension management
  • Improved breakpoint logic (Mobile: <768px, Tablet: 768-1024px, Desktop: >1024px)
  • Enhanced positioning service with responsive margins
  • Better adaptation to high DPI displays

1.0.0 - 2025-09-02 #

Added #

  • ๐ŸŽ‰ Initial release of the Toastr Flutter package (published as toastr_flutter)
  • โœจ Four notification types: success, error, warning, and info with predefined colors and icons
  • ๐ŸŽจ Multiple positioning options: topLeft, topCenter, topRight, bottomLeft, bottomCenter, bottomRight, and center
  • ๐ŸŽญ Rich animation support:
    • Show animations: fadeIn, slideDown, slideUp, slideLeft, slideRight, show
    • Hide animations: fadeOut, slideUp, slideDown, slideLeft, slideRight, hide
    • Customizable easing curves for both show and hide animations
  • โš™๏ธ Comprehensive configuration options:
    • Custom titles and messages
    • Configurable duration and extended timeout
    • Dismissible notifications with tap-to-dismiss
    • Optional close button
    • Custom icons and colors (background and text)
    • Progress bar support
    • Duplicate prevention system
  • ๐Ÿ”’ Security features:
    • Input validation and sanitization
    • Rate limiting to prevent spam
    • Maximum active notifications limit
    • Security event logging
  • ๐ŸŽฏ Easy-to-use API:
    • Static helper methods: ToastrHelper.success(), ToastrHelper.error(), etc.
    • Full configuration support via ToastrConfig class
    • Global configuration management
    • Service-based architecture with ToastrService
  • ๐ŸŽช Interactive features:
    • Hover effects with pause-on-hover functionality
    • Auto-dismiss with configurable timing
    • Manual dismissal support
    • Clear all notifications functionality
  • ๐Ÿ“ฑ Flutter integration:
    • Overlay-based rendering for optimal performance
    • Material Design compliance
    • Support for Flutter 3.0+ and Dart 3.9+
  • ๐Ÿงช Comprehensive testing:
    • Unit tests for core functionality
    • Security validation tests
    • Error handling tests
  • ๐Ÿ“š Complete documentation:
    • Detailed README with examples
    • API reference documentation
    • Working example application
  • ๐Ÿ”ง Developer experience:
    • Type-safe configuration
    • Null-safety support
    • Lint-compliant code
    • Professional project structure

Technical Details #

  • Minimum Flutter version: 3.0.0
  • Minimum Dart SDK: 3.9.0
  • Dependencies: Only Flutter SDK (no external dependencies)
  • Platform support: All Flutter-supported platforms

Example Usage #

// Basic usage
ToastrHelper.success('Operation completed successfully!');
ToastrHelper.error('Something went wrong!');
ToastrHelper.warning('Please check your input');
ToastrHelper.info('Here is some useful information');

// Advanced usage with custom configuration
ToastrHelper.custom(
  ToastrConfig(
    type: ToastrType.success,
    message: 'Custom notification',
    title: 'Success',
    duration: Duration(seconds: 5),
    position: ToastrPosition.bottomCenter,
    showMethod: ToastrShowMethod.slideUp,
    hideMethod: ToastrHideMethod.fadeOut,
    showProgressBar: true,
    showCloseButton: true,
  ),
);

Documentation #

  • Comprehensive README with installation guide, usage examples, and API reference
  • Working example application demonstrating all features
  • Complete API documentation for all public classes and methods

[Unreleased] #

Planned Features #

  • Custom animation curves support
  • Sound effects for notifications
  • Notification queuing system
  • Theme integration with Flutter's ThemeData
  • Accessibility improvements (screen reader support)
  • Custom notification layouts
  • Notification history/log
  • Analytics and usage tracking options

Note: This changelog follows the Keep a Changelog format and Semantic Versioning principles.

0
likes
0
points
49
downloads

Publisher

verified publisherignacio-manchu.com

Weekly Downloads

A highly customizable Flutter package for displaying beautiful toast notifications with animations, multiple types, and flexible positioning.

Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (license)

Dependencies

flutter

More

Packages that depend on toastr_flutter