adaptive_dialog_manager 1.0.2
adaptive_dialog_manager: ^1.0.2 copied to clipboard
A comprehensive Flutter adaptive dialog manager package that provides multi-platform dialog support with responsive design, accessibility features, and platform-specific behaviors.
Changelog #
All notable changes to the Adaptive Dialog Manager package will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.2 - 2025-01-27 #
π Added #
Enhanced Snackbar Configuration
-
New Dismissible Properties
- Added
dismissible
property toSnackbarConfig
for controlling user dismissal behavior - Added
autoDismiss
property to control automatic dismissal after duration - Added
dismissDirection
property to customize swipe-to-dismiss direction - Added
shouldAutoDismiss
getter method for intelligent auto-dismiss logic
- Added
-
Animation Configuration
- Added
animationDuration
property toSnackbarConfig
for custom animation timing - Added
animationCurve
property toSnackbarConfig
for custom animation curves - Enhanced animation system with platform-specific defaults and customization
- Added
-
Factory Constructor Enhancements
- Updated
SnackbarConfig.action()
to supportduration
parameter - Updated
SnackbarConfig.banner()
to supportduration
parameter - Updated
SnackbarConfig.custom()
to supportduration
anddismissible
parameters - Updated
SnackbarConfig.loading()
to supportdismissible
parameter
- Updated
π§ Fixed #
-
Linter Error Resolution
- Fixed missing
dismissible
property error inAdaptiveSnackbarManager
- Fixed missing
autoDismiss
property error inAdaptiveSnackbarManager
- Fixed missing
dismissDirection
property error inAdaptiveSnackbarManager
- Fixed missing
animationDuration
property error inAdaptiveSnackbarManager
- Fixed missing
animationCurve
property error inAdaptiveSnackbarManager
- Fixed missing
-
Configuration Consistency
- Ensured all snackbar configuration properties are properly mapped in
toMap()
method - Updated
fromMap()
factory constructor to handle new properties - Updated
copyWith()
method to include all new properties - Updated equality operator and hashCode to include new properties
- Ensured all snackbar configuration properties are properly mapped in
π§ Changed #
-
Smart Auto-Dismiss Logic
shouldAutoDismiss
getter now prevents auto-dismissal for persistent snackbars- Improved logic: returns
true
only ifautoDismiss
istrue
AND snackbar type is NOT persistent - Enhanced user experience with context-aware dismissal behavior
-
Type Safety Improvements
- All new properties are properly typed with null safety
- Enhanced compile-time type checking for configuration validation
- Improved error handling for invalid configuration combinations
π Documentation #
-
Enhanced Configuration Examples
- Updated README with new dismissible configuration examples
- Added animation customization examples
- Improved factory constructor documentation
-
API Reference Updates
- Complete documentation for all new properties
- Usage examples for custom animation and dismissal behavior
- Best practices for different snackbar types
π§ͺ Testing #
- Configuration Validation
- Enhanced type safety for all new properties
- Improved error handling for edge cases
- Better validation for animation and dismissal parameters
1.0.1 - 2025-06-25 #
π Added #
Toast System Enhancements
-
Column Layout Mode for Toasts
- New
ToastLayout.column
option for vertical toast arrangement - Maximum 4 visible toasts in column mode for optimal UX
- Clean, organized vertical display instead of overlapping toasts
- Position-aware column placement (top, bottom, center, left, right)
- Responsive column width based on screen size (mobile, tablet, desktop)
- Proper spacing and margins for visual clarity
- New
-
Enhanced Toast Configuration
- Updated
ToastConfig
withlayout
parameter for choosing between stack and column modes - Backward compatibility maintained - existing code continues to work
ToastLayout
enum withstack
(default) andcolumn
options- Extension methods for easy layout conversion and validation
- Updated
-
Improved Toast Widgets
- New
ToastColumnOverlay
widget for column-based toast display - Optimized widget management with proper key-based identification
- Efficient overlay updates with minimal rebuilds
- Memory-efficient toast widget storage and cleanup
- New
-
Developer Experience Improvements
- Enhanced debug logging for column mode operations
- Clear documentation and examples for column layout usage
- Simple API - just set
layout: ToastLayout.column
in ToastConfig - Comprehensive example page demonstrating column mode features
Technical Improvements
-
Architecture Simplification
- Streamlined column toast management with clean separation from stack mode
- Simplified widget lifecycle management
- Reduced complexity while maintaining full functionality
- Type-safe widget handling with
ValueKey<String>
identification
-
Performance Optimizations
- Efficient toast limiting with
List.take()
for maximum visible count - Minimal overlay rebuilds when toasts are added/removed
- Proper resource cleanup and memory management
- Optimized for smooth animations and transitions
- Efficient toast limiting with
π§ Changed #
ToastConstants.maxVisibleColumnToasts
updated from 3 to 4 for better UX- Enhanced
ToastColumnOverlay
(renamed fromSimpleColumnOverlay
) for consistency - Improved toast positioning calculations for all screen sizes
π Documentation #
- Updated README.md with column layout examples and usage patterns
- Added comprehensive column mode documentation
- New code examples showing multiple toasts in column layout
- Enhanced API documentation for
ToastLayout
enum and related classes
π§ͺ Example Application #
- New interactive column mode example page
- Real-time toast counter and debug information
- Multiple toast types demonstration in column layout
- Position selection and testing capabilities
1.0.0 - 2025-06-25 #
π Initial Release #
Added
-
Multi-Platform Dialog System
- Comprehensive adaptive dialog management for all Flutter platforms (Android, iOS, Web, Windows, macOS, Linux, Fuchsia)
- Platform-specific dialog behaviors with Material, Cupertino, Fluent, and macOS design systems
- 25+ dialog types: alert, confirmation, input, loading, progress, bottomSheet, custom, modal, fullScreen, datePicker, timePicker, colorPicker, filePicker, search, settings, about, help, error, warning, success, info, toast, snackbar
- Responsive design with automatic layout adaptation for mobile, tablet, and desktop
- Comprehensive dialog queue management system with intelligent queuing
- Singleton pattern implementation (
AdaptiveDialogManager
) for efficient resource management
-
Advanced Snackbar System
- Dedicated adaptive snackbar manager (
AdaptiveSnackbarManager
) with platform-specific behaviors - 10 snackbar types: info, success, warning, error, loading, action, custom, toast, banner, persistent
- Advanced positioning: top, bottom, center with fine-grained offset control
- Behavior types: fixed, floating, pinned behaviors for different interaction patterns
- Action support with customizable callbacks and interactive buttons
- Priority-based queue management for intelligent notification ordering
- Custom content support with widget injection
- Dedicated adaptive snackbar manager (
-
Toast Notification System
- Comprehensive toast manager (
AdaptiveToastManager
) with cross-platform support - 5 toast types: info, success, warning, error, custom
- Flexible positioning: top, bottom, center positioning with offset control
- Stack and queue layouts: traditional overlapping or queued display options
- Timing management: automatic duration control with pause/resume capabilities
- Custom content support with widget-based customization
- Comprehensive toast manager (
-
Rich Animation System
- 16 built-in animation types: none, fade, scale, slideFromBottom, slideFromTop, slideFromLeft, slideFromRight, slideUp, slideDown, elastic, bounce, rotation, flip, pop, blur, custom
- Platform-optimized timing and curves for smooth user experience
- Performance profiles: mobile-friendly and high-performance variants
- Reduced motion support for accessibility compliance
- Animation duration and curve customization
-
Comprehensive Configuration Models
- Type-safe
DialogConfig
model extendingBaseDataModel
from flutter_shared_utilities - Advanced
SnackbarConfig
with comprehensive customization options - Feature-rich
ToastConfig
for flexible toast configuration - Generic
DialogResult<T>
,SnackbarResult<T>
, andToastResult<T>
with type safety PlatformSettings
for platform-specific configurationsResponsiveConfig
for breakpoint-aware layouts
- Type-safe
-
Advanced Enums
DialogType
- 25+ dialog variants for comprehensive coverageSnackbarType
- 10 snackbar types with different behaviors and prioritiesToastType
- 5 toast variants with customizable stylingPlatformType
- Support for Android, iOS, web, windows, macOS, linux, fuchsiaAnimationType
- 16 different animation options with performance considerationsSnackbarPosition
- Comprehensive positioning with top, bottom, center, topLeft, topRight, bottomLeft, bottomRight, centerLeft, centerRight optionsSnackbarBehavior
- Fixed, floating, pinned, overlay, modal behaviorsToastPosition
- Flexible toast positioning optionsToastLayout
- Stack and queue layout patternsResponsiveBreakpoint
- Mobile, tablet, desktop, large breakpoints
-
Utility Classes
PlatformDetector
for automatic platform detection with override capabilitiesResponsiveManager
for breakpoint management and responsive layoutsSettingsController
for managing dialog and notification preferences- Debug mode with comprehensive logging for development
- Queue status monitoring and management across all notification types
-
Advanced Widget Components
AdaptiveSnackbar
- Platform-specific snackbar implementationAdaptiveToast
- Cross-platform toast widgetSnackbarOverlay
andToastOverlay
- Advanced overlay management- Utility widgets:
ColorPicker
,ColorGrid
,FilePickerContent
,GenericSearchDelegate
SettingsContent
andHelpPage
- Pre-built configuration pages
-
Queue Management System
DialogQueueManager
- Intelligent queue management for dialogsSnackbarQueueManager
- Priority-based snackbar queue handlingToastQueueManager
- Stack and queue-based toast managementToastTimingManager
- Advanced timing control for toast notifications- Stream-based state management with real-time updates
-
Accessibility Features
- Screen reader support with comprehensive semantic labeling
- Keyboard navigation for desktop platforms (Tab, Enter, Escape, Arrow keys)
- Focus management with proper focus trapping and restoration
- High contrast support with theme-aware color schemes
- Touch target sizing with minimum accessibility requirements (48dp)
- Reduced motion detection and automatic adaptation
- WCAG compliance features
-
Developer Experience
- Abstract interfaces (
DialogManager
,SnackbarManager
,ToastManager
) for dependency injection - Comprehensive error handling with detailed error messages and stack traces
- Debug mode with detailed logging for development and troubleshooting
- Type-safe configuration with compile-time checks
- Stream-based state management for reactive programming
- Singleton pattern for efficient memory usage
- Clean Architecture principles with separation of concerns
- Abstract interfaces (
-
Dependencies
flutter_shared_utilities: ^1.0.6
for base models and safe type utilitiesuniversal_io: ^2.2.2
for cross-platform I/O operations- Minimal dependency footprint for optimal package size
-
Example Application
- Comprehensive example app demonstrating all features
- 7 showcase pages: Home, Dialog Examples, Snackbar Showcase, Toast Showcase, Animation Showcase, Platform Showcase, Responsive Showcase
- Interactive examples with real-time configuration
- Platform-specific demonstrations for all supported platforms
- Animation playground with all 16 animation types
- Responsive design examples for different screen sizes
- Theme switching and accessibility demonstrations
-
Documentation
- Comprehensive README with 50+ code examples
- API documentation with detailed parameter descriptions
- Installation guide for all platforms
- Architecture documentation with interfaces and patterns
- Customization examples and best practices
- Performance optimization recommendations
- Accessibility guide with WCAG compliance information
Technical Details
-
Minimum Requirements
- Flutter SDK: >=3.19.0
- Dart SDK: ^3.8.1
- All major platforms supported (Android, iOS, Web, Windows, macOS, Linux)
-
Architecture
- Clean Architecture with modular design
- Repository pattern implementation for data management
- Singleton pattern for manager classes
- Stream-based state management for reactive updates
- Platform adapter pattern for cross-platform support
- Interface segregation for testability
-
Performance
- Lazy initialization of resources and managers
- Efficient queue management algorithms with O(log n) operations
- Memory leak prevention with proper disposal patterns
- Optimized animations for different device capabilities
- Platform-specific optimizations for each target platform
-
Type Safety
- All models extend
BaseDataModel
with safe type conversion - Generic result types for compile-time type checking
- Comprehensive null safety throughout the codebase
- Safe parsing methods for all data transformations
- All models extend
Constants and Configuration
- Animation Constants: Default durations, curves, and performance profiles
- Breakpoint Constants: Responsive design breakpoints for mobile, tablet, desktop
- Dialog Constants: Default styling, dimensions, and behavior settings
- Snackbar Constants: Positioning, timing, and appearance defaults
- Toast Constants: Duration, positioning, and animation defaults
π Known Issues #
- None reported in initial release
π Migration Guide #
- This is the initial release, no migration needed
[Unreleased] #
Planned Features #
- β Voice control support for enhanced accessibility
- β Gesture customization for mobile interaction patterns
- β Advanced theming system with custom theme builders
- β Performance analytics and monitoring dashboard
- β Plugin architecture for extensibility and custom notifications
- β Multi-window support for desktop platforms
- β Internationalization (i18n) support with localization
- β More animation presets and custom animation builders
- β Enhanced debugging tools and visual debugger
- β Integration with popular state management solutions (Riverpod, Bloc)
- β Material You (Material 3) design system support
- β macOS native dialog support with NSAlert integration
- β Windows native dialog support with Win32 APIs
- β Advanced queue management with priority scheduling
- β Biometric authentication dialog support
Development Notes #
Version Numbering #
This project follows Semantic Versioning:
- MAJOR version for incompatible API changes
- MINOR version for backward-compatible functionality additions
- PATCH version for backward-compatible bug fixes
Release Process #
- Update version in
pubspec.yaml
- Update CHANGELOG.md with new version details
- Create and test example applications
- Run comprehensive test suite
- Update documentation and README
- Create GitHub release with tags
- Publish to pub.flutter-io.cn
Contributing #
For contribution guidelines, please see CONTRIBUTING.md.
Support #
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: bahricanyesildev@gmail.com
Made with β€οΈ in Turkey