adaptive_dialog_manager 2.1.2
adaptive_dialog_manager: ^2.1.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.
2.1.2 - 2025-10-10 #
- Fix consecutive sync snackbar display bug without a delay
2.1.1 - 2025-10-10 #
2.1.0 - 2025-09-10 #
π Added #
Enhanced SnackbarConfig Factory Methods
-
Complete Configuration Parameter Support
- All factory methods now include every configuration parameter available in the main constructor
- Added 40+ missing parameters to each factory method for full customization capability
- Enhanced factory methods:
info()
,success()
,warning()
,error()
,loading()
,action()
,custom()
,toast()
,banner()
,persistent()
-
Full Parameter Coverage
- Core Configuration:
platformType
,position
,behavior
,animationType
,breakpoint
- Content & Actions:
customContent
,actionLabel
,onActionPressed
,onDismissed
,onShown
- Display Options:
showIcon
,icon
,showAction
,showCloseButton
,tapToDismiss
,swipeToDismiss
- Behavior Controls:
dismissible
,autoDismiss
,dismissDirection
,animationDuration
,animationCurve
- Styling:
backgroundColor
,textColor
,iconColor
,actionColor
,borderRadius
,elevation
- Layout & Positioning:
margin
,padding
,width
,height
,minWidth
,maxWidth
,minHeight
,maxHeight
,customOffset
,useSafeArea
,floatingMargin
- Management:
stackIndex
,groupId
,persistentId
,replacementId
,allowDuplicates
- Progress & Accessibility:
showProgress
,progressValue
,additionalData
,semanticLabel
- Priority & Timing:
priority
,duration
- Core Configuration:
π§ Enhanced #
Factory Method Improvements
-
Comprehensive Customization
- Every factory method now provides access to all 48+ configuration parameters
- Maintained semantic defaults while enabling full override capability
- Smart default values preserved for each snackbar type while allowing complete customization
-
Type Safety & Consistency
- All parameters maintain proper nullable types and default values
- Consistent parameter ordering across all factory methods
- Enhanced type safety with comprehensive null checking and default fallbacks
-
Developer Experience
- IntelliSense now shows all available parameters for any factory method
- Complete API surface available from any entry point
- Improved code discoverability and parameter exploration
π― Impact #
API Enhancement
-
Backward Compatibility Maintained
- All existing code continues to work without modification
- Previous factory method calls remain fully functional
- No breaking changes to existing APIs or method signatures
-
Enhanced Flexibility
- Developers can now customize every aspect of snackbars from any factory method
- No need to use
copyWith()
for advanced customization - Direct parameter access from semantic factory constructors
2.0.0 - 2025-07-30 #
π Added #
Advanced Async Dialog Button System
-
AsyncDialogButton Widget
- New
AsyncDialogButton
widget that displays loading indicators during async operations - Automatic loading state management with customizable loading widgets
- Built-in cancellation token support for interruptible operations
- Integration with global button style configurations
- Support for both sync and async callbacks with type safety
- New
-
Multi-Platform Async Button Variants
AsyncDialogTextButton
for Material Design text buttons with async supportAsyncCupertinoDialogAction
for iOS-style dialog actions with loading states- Consistent async behavior across all supported platforms
- Platform-specific loading indicator styling and sizing
-
Enhanced Dialog Actions
- Support for
CancellableFutureOrCallback
inDialogAction.onPressed
- Seamless integration between sync, async, and cancellable operations
- Type-safe callback handling with proper error propagation
- Enhanced button style merging priority: action style β config style β global style β default
- Support for
Comprehensive Cancellation Token System
-
CancellationToken Implementation
- Full-featured
CancellationToken
class for cancelling async operations CancellationTokenSource
for managing token lifecycle and cancellation- Support for linked/nested cancellation tokens with parent-child relationships
- Pre-built tokens:
CancellationToken.cancelled
andCancellationToken.none
- Full-featured
-
Operation Cancellation Support
OperationCancelledException
for proper async operation terminationthrowIfCancelled()
method for early cancellation detection- Callback registration system for cleanup operations
- Future-based cancellation notifications
-
Async Operation Integration
- Automatic cancellation when dialog buttons are disposed
- Graceful handling of cancelled operations without error propagation
- Memory leak prevention through proper resource cleanup
- Integration with Flutter's widget lifecycle
Dialog Interaction Controller System
-
DialogInteractionController Class
- New controller for managing dialog interaction states
disableActionsOnPress
feature to prevent multiple simultaneous actions- State management for dialog-wide action enabling/disabling
- Future-based notification when actions become disabled
-
Enhanced Dialog Interaction Management
_DialogWrapper
widget for centralized interaction control- PopScope integration that respects interaction controller state
- Barrier dismissal prevention during action execution
- Gesture dismissal blocking when actions are disabled
-
Action State Coordination
- Automatic action disabling when any button is pressed (optional)
- State synchronization across all dialog buttons
- Listener-based state updates with proper lifecycle management
- Prevention of dialog dismissal during ongoing operations
Global Dialog Button Style Configuration System
-
GlobalDialogButtonStyleConfig Model
- Comprehensive global button styling system for consistent dialog appearance
- Support for primary, secondary, and destructive button styles
- Platform-specific styling: Material and Cupertino text styles
- Loading indicator customization (color, size, stroke width)
-
Predefined Style Configurations
- Material Design: Standard Material button styles with elevation and rounded corners
- Cupertino: iOS-style text styling with appropriate font weights and colors
- Minimal: Compact button styles with reduced padding and lower elevation
- Rounded: Enhanced rounded button styles with larger padding and higher elevation
-
Smart Style Resolution System
- Hierarchical style merging: action β config β global β default
- Individual dialog override capability while maintaining global defaults
- Type-safe style configuration with proper null handling
- Integration with existing dialog styling systems
Enhanced Dialog Configuration
-
New DialogConfig Properties
disableActionsOnPress
boolean for controlling interaction behavior- Enhanced button style properties:
primaryButtonStyle
,secondaryButtonStyle
,destructiveButtonStyle
- Cupertino-specific text styling:
cupertinoTextStyle
,cupertinoDestructiveTextStyle
- Complete serialization support for all new properties
-
Dialog Manager Interface Extensions
- Added
setGlobalButtonStyleConfig()
method for setting global button styles - Added
getGlobalButtonStyleConfig()
method for retrieving current configuration - Added
resetGlobalButtonStyleConfig()
method for resetting to defaults disableActionsOnPress
parameter support inshowAlert()
andshowConfirmation()
methods
- Added
π§ Changed #
Dialog Button Architecture Enhancement
-
Advanced Button Rendering System
- Updated Material dialog builder to use new async button widgets
- Enhanced Cupertino dialog builder with async action support
- Improved button style merging logic with global configuration integration
- Better loading indicator positioning and styling across platforms
-
Dialog Lifecycle Management
- Enhanced dialog wrapper system for better state management
- Improved context validation and error handling in queue manager
- Better resource cleanup and memory management
- Enhanced PopScope integration with interaction controller state
-
Library Export Updates
- Added
AsyncDialogButton
,DialogInteractionController
, andCancellationToken
to public API - Added
GlobalDialogButtonStyleConfig
to main library exports - Maintained clean separation between public and internal APIs
- Enhanced developer experience with proper model accessibility
- Added
Configuration Model Enhancements
-
DialogConfig Model Updates
- Added support for cancellable callbacks in action definitions
- Enhanced
copyWith()
method to include all new interaction properties - Improved
toMap()
andfromMap()
methods with new configuration fields - Updated equality operator and hashCode with new properties
-
DialogAction Model Updates
- Updated
onPressed
callback to supportCancellableFutureOrCallback
- Enhanced action definition with better type safety
- Improved action copying and equality comparison
- Better integration with async operation patterns
- Updated
π§ Fixed #
-
Async Operation Safety
- Fixed potential memory leaks in async dialog button operations
- Enhanced error handling for cancelled and failed async operations
- Improved cleanup of cancellation tokens and resources
- Better handling of widget disposal during async operations
-
Dialog Interaction Consistency
- Fixed potential race conditions in dialog action handling
- Enhanced state synchronization across dialog components
- Improved interaction controller lifecycle management
- Better handling of rapid button presses and edge cases
-
Type Safety Improvements
- Enhanced null safety throughout async operation handling
- Improved type checking for callback and cancellation token usage
- Better validation for dialog configuration combinations
- Enhanced error messages for invalid async operation scenarios
π Documentation #
-
Enhanced API Documentation
- Comprehensive documentation for async dialog button system
- Detailed examples of cancellation token usage patterns
- Usage guides for dialog interaction controller features
- Best practices for async dialog operations and error handling
-
Interactive Example Updates
- Enhanced dialog examples page with async operation demonstrations
- Real-time examples of cancellation token functionality
- Interactive global button style configuration examples
- Educational content explaining async dialog patterns
β‘ Performance #
-
Optimized Async Operations
- Efficient cancellation token management with minimal overhead
- Smart loading state updates with reduced rebuilds
- Optimized button style resolution and caching
- Memory-efficient async operation tracking
-
Enhanced Resource Management
- Automatic cleanup of async operations and cancellation tokens
- Improved memory usage patterns for dialog interaction controllers
- Better garbage collection of completed async operations
- Optimized listener management and state updates
β οΈ Breaking Changes Impact #
-
DialogAction.onPressed Signature Change
- All existing
DialogAction.onPressed
callbacks must be updated to new signature - Compilation errors will occur until callbacks are migrated to new format
- No automatic migration possible due to fundamental signature change
- All dialog actions using custom
onPressed
callbacks require manual updates
- All existing
-
Enhanced Functionality (Non-Breaking)
- Other dialog manager APIs continue to work without modification
- Global button style configurations work with existing dialogs
- New async features enhance functionality once callbacks are migrated
- Dialog queue management and state systems remain compatible
π₯ Breaking Changes #
DialogAction Callback Signature Change
- BREAKING:
DialogAction.onPressed
callback signature changed fromVoidCallback?
toCancellableFutureOrCallback?
- BREAKING: All
onPressed
callbacks now receive an optionalCancellationToken
parameter - BREAKING: Async callbacks are now natively supported but require signature updates
- Impact: Existing code using
DialogAction.onPressed
must be updated to match new signature
Required Migration Steps
Before (v1.x):
DialogAction(
label: 'Save',
onPressed: () {
// Sync operation
saveData();
},
)
// Or async (workaround):
DialogAction(
label: 'Save',
onPressed: () async {
await saveData(); // No cancellation support
},
)
After (v2.0.0):
DialogAction(
label: 'Save',
onPressed: ({CancellationToken? token}) {
// Sync operation
saveData();
},
)
// Or async with cancellation:
DialogAction(
label: 'Save',
onPressed: ({CancellationToken? token}) async {
await saveData(cancellationToken: token);
},
)
π Migration Guide #
This is a major version update with breaking changes:
β οΈ BREAKING CHANGES REQUIRE CODE UPDATES
Step 1: Update DialogAction callbacks
// OLD (will cause compilation errors):
DialogAction(
label: 'Action',
onPressed: () { /* code */ },
)
// NEW (required format):
DialogAction(
label: 'Action',
onPressed: ({CancellationToken? token}) { /* code */ },
)
Step 2: Update async operations
// OLD:
onPressed: () async {
await longRunningTask();
},
// NEW (with cancellation support):
onPressed: ({CancellationToken? token}) async {
await longRunningTask(cancellationToken: token);
},
Enhanced Usage Examples:
// Existing sync dialogs continue to work unchanged
await AdaptiveDialogManager.instance.showAlert<void>(
context: context,
title: 'Simple Alert',
content: 'This works exactly as before',
);
// New async dialog with cancellation support
await AdaptiveDialogManager.instance.showConfirmation(
context: context,
title: 'Async Confirmation',
content: 'This dialog supports async operations',
disableActionsOnPress: true, // Prevent multiple clicks
confirmAction: DialogAction(
label: 'Save Data',
onPressed: ({CancellationToken? token}) async {
// Async operation with cancellation support
await saveDataToServer(cancellationToken: token);
},
),
);
// Global button style configuration
AdaptiveDialogManager.instance.setGlobalButtonStyleConfig(
GlobalDialogButtonStyleConfig.material()
);
// Custom async button in dialog config
DialogConfig(
title: 'Custom Dialog',
actions: [
DialogAction(
label: 'Process',
isPrimary: true,
onPressed: ({CancellationToken? token}) async {
try {
await performLongRunningTask(token: token);
} on OperationCancelledException {
// Handle cancellation gracefully
}
},
),
],
disableActionsOnPress: true, // Prevent interaction during processing
),
Key Benefits After Migration:
- Native Async Support: Built-in async operation support with loading indicators and cancellation
- Better UX: Prevents multiple simultaneous actions and provides visual feedback
- Consistent Styling: Global button style configuration for uniform appearance
- Enhanced Safety: Proper cancellation handling and resource cleanup
- Modern API: Type-safe async operations with proper cancellation support
Migration Effort:
- Required: Update all
DialogAction.onPressed
callbacks to new signature - Optional: Add cancellation token support to async operations
- Benefit: Significantly improved async dialog handling and user experience
1.1.9 - 2025-07-22 #
π Added #
Global Dialog Padding Configuration System
-
GlobalDialogPaddingConfig Model
- New comprehensive model for managing global dialog padding values across all dialog elements
- Complete control over
dialogPadding
,titlePadding
,contentPadding
,actionsPadding
,buttonPadding
,iconPadding
, andinsetPadding
- Full serialization support with
toMap()
andfromMap()
methods for configuration persistence - Type-safe EdgeInsets handling with proper null safety throughout
-
Predefined Padding Configurations
- Default Configuration: Standard comfortable padding with 24px dialog padding, appropriate title/content spacing
- Minimal Configuration: Compact layout with reduced spacing (8px base) for space-constrained interfaces
- Spacious Configuration: Extra generous spacing (32px base) for comfortable viewing on larger screens
- Compact Configuration: Mobile-optimized tight spacing (16px base) for efficient use of screen real estate
- Factory constructors for easy instantiation:
GlobalDialogPaddingConfig.minimal()
,.spacious()
,.compact()
-
Enhanced Dialog Manager Interface
- Added
setGlobalPaddingConfig(GlobalDialogPaddingConfig config)
method for setting global defaults - Added
getGlobalPaddingConfig()
method for retrieving current global configuration - Added
resetGlobalPaddingConfig()
method for resetting to default values - Complete integration with existing
DialogManager
interface maintaining backward compatibility
- Added
-
Smart Default Integration Logic
- Automatic fallback to global padding values when individual
DialogConfig
properties useEdgeInsets.zero
- Individual dialogs can still override global settings by providing specific padding values
- Intelligent padding resolution system that respects both global defaults and individual customizations
- Full backward compatibility - existing code continues to work unchanged
- Automatic fallback to global padding values when individual
-
Interactive Configuration Example
- New "Global Padding Configuration" button in dialog examples page with tune icon
- Real-time padding preset selection interface with visual descriptions
- Live demonstration showing immediate effect of different padding configurations
- Test dialog functionality to preview current global padding settings
- Educational descriptions for each preset (minimal, default, spacious, compact)
π§ Changed #
Dialog Padding Resolution Enhancement
-
Enhanced Material Dialog Builder
- Updated
_buildMaterialDialog()
to use global padding configuration as intelligent defaults - Smart padding resolution that prioritizes individual config values over global defaults
- Improved padding consistency across all Material dialog elements
- Better integration with existing dialog properties and styling
- Updated
-
Library Export Updates
- Added
GlobalDialogPaddingConfig
to main library exports for public API access - Maintained clean separation between public and internal APIs
- Enhanced developer experience with proper model accessibility
- Added
π§ Fixed #
-
Type Safety Improvements
- Enhanced EdgeInsets type checking and conversion throughout padding system
- Improved null safety handling for complex padding configurations
- Better error handling for invalid padding combinations
- Reduced type assertion usage in favor of safer type checking patterns
-
Configuration Consistency
- Ensured all global padding properties are properly applied across dialog elements
- Fixed potential edge cases where global padding might not be respected
- Improved configuration precedence logic for predictable behavior
π Documentation #
-
Enhanced API Documentation
- Comprehensive documentation for
GlobalDialogPaddingConfig
class and all factory constructors - Detailed usage examples for setting and using global padding configurations
- Best practices guidance for choosing appropriate padding presets
- Migration examples showing integration with existing dialog code
- Comprehensive documentation for
-
Interactive Example Documentation
- User-friendly interface for testing different global padding configurations
- Real-time feedback showing the impact of padding changes on dialog appearance
- Educational content explaining the purpose and benefits of each preset
π― Use Cases Enabled #
The global padding configuration system enables several advanced scenarios:
- Consistent Brand Experience: Set company-wide dialog padding standards across entire applications
- Platform Adaptation: Different padding presets for mobile vs desktop vs tablet interfaces
- Accessibility Support: Spacious padding for users requiring larger touch targets and more comfortable spacing
- Theme Integration: Padding configurations that align with overall application design systems
- User Preferences: Allow users to choose their preferred spacing density (compact, normal, spacious)
- Responsive Design: Automatic padding adjustment based on screen size categories
π― Backward Compatibility #
- Fully Backward Compatible
- All existing
DialogConfig
usage continues to work without modification - Global padding serves as intelligent defaults only when individual configs use
EdgeInsets.zero
- No breaking changes to existing dialog APIs or method signatures
- Existing serialization and configuration persistence mechanisms remain unchanged
- Optional adoption of global padding features with gradual migration path
- All existing
β‘ Performance #
- Optimized Padding Resolution
- Efficient global configuration storage with singleton pattern integration
- Minimal performance overhead for padding resolution logic
- Smart caching of global configuration to avoid unnecessary lookups
- Memory-efficient EdgeInsets handling throughout the padding system
π Migration Guide #
This is a minor version update with full backward compatibility:
No Breaking Changes: All existing code continues to work without modification
Enhanced Usage Examples:
// Set global padding configuration once for entire app
AdaptiveDialogManager.instance.setGlobalPaddingConfig(
GlobalDialogPaddingConfig.spacious()
);
// All subsequent dialogs automatically use global padding
await dialogManager.showAlert(
context: context,
title: 'Alert',
content: 'This uses global spacious padding automatically',
);
// Individual dialogs can still override global settings
await dialogManager.showDialog(
context: context,
DialogConfig(
title: 'Custom Dialog',
content: 'This uses custom padding',
padding: EdgeInsets.all(12.0), // Overrides global setting
titlePadding: EdgeInsets.all(8.0), // Overrides global setting
),
);
// Predefined configurations for common use cases
AdaptiveDialogManager.instance.setGlobalPaddingConfig(
GlobalDialogPaddingConfig.compact() // Mobile-optimized
);
AdaptiveDialogManager.instance.setGlobalPaddingConfig(
GlobalDialogPaddingConfig.minimal() // Space-constrained
);
// Custom global configuration
AdaptiveDialogManager.instance.setGlobalPaddingConfig(
GlobalDialogPaddingConfig(
dialogPadding: EdgeInsets.all(20.0),
titlePadding: EdgeInsets.fromLTRB(20.0, 20.0, 20.0, 0.0),
contentPadding: EdgeInsets.all(16.0),
actionsPadding: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 8.0),
buttonPadding: EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0),
iconPadding: EdgeInsets.only(bottom: 16.0),
insetPadding: EdgeInsets.symmetric(horizontal: 40.0, vertical: 24.0),
),
);
// Reset to default configuration
AdaptiveDialogManager.instance.resetGlobalPaddingConfig();
Key Benefits:
- Set Once, Use Everywhere: Configure padding globally instead of repeating values in every dialog
- Consistent UX: Ensure uniform spacing across all dialogs in your application
- Easy Customization: Switch between predefined presets or create custom configurations
- Backward Compatible: Existing dialog code works unchanged while gaining global defaults
- Flexible Override: Individual dialogs can still use custom padding when needed
1.1.8 - 2025-07-20 #
π Added #
Widget Title Support for Enhanced Dialog Flexibility
-
Widget-Based Dialog Titles
- Added
titleWidget
property toDialogConfig
for full Widget title support - Widget titles take precedence over string titles when both are provided
- Support for rich text, icons, gradients, custom layouts, and animations in dialog titles
- Complete integration with all platforms: Material, Cupertino, Fluent, macOS, and Web dialogs
- Added
-
Enhanced Dialog Manager Interface
- Added
showAlertWithWidget<T>()
method for alerts with Widget titles - Added
showConfirmationWithWidget()
method for confirmations with Widget titles - Added
showInputDialogWithWidget()
method for input dialogs with Widget titles - Maintained full backward compatibility with existing String-based methods
- Added
-
Comprehensive Widget Title Examples
- Rich Text Titles: Multiple text styles, colors, and decorations in a single title
- Icon + Text Titles: Icons alongside text for enhanced visual communication
- Gradient Titles: Custom gradient backgrounds and styling effects
- Custom Layout Titles: Complex widget compositions with columns, rows, and custom layouts
- Interactive examples in the demo application with real-world use cases
Developer Experience Improvements
-
Enhanced DialogExampleCard Widget
- Added support for custom title and description properties
- Flexible constructor supporting both DialogType-based and custom configurations
- Improved type safety with proper assertion checks
- Enhanced icon and color customization options
-
Improved Example Application
- New "Widget Title Examples" section in dialog examples page
- Interactive demonstrations of rich text, icon+text, gradient, and custom layout titles
- Real-world examples showing practical Widget title usage patterns
- Enhanced navigation and user experience in example app
π§ Changed #
Dialog Builder Architecture
-
Material Dialog Builder Enhancement
- Updated
_buildMaterialDialog()
to prioritizetitleWidget
over string title - Proper Widget title rendering with existing style support
- Seamless integration with all Material dialog properties
- Updated
-
Cupertino Dialog Builder Enhancement
- Updated
_buildCupertinoDialog()
to handle Widget titles appropriately - Consistent Widget title behavior across iOS and macOS platforms
- Maintained Cupertino design guidelines with Widget title support
- Updated
-
Full-Screen Dialog Support
- Updated
_showFullScreenDialog()
to support Widget titles in AppBar - Consistent Widget title rendering in full-screen dialog mode
- Proper title widget handling for navigation contexts
- Updated
Configuration Model Updates
-
DialogConfig Model Enhancement
- Added
titleWidget
property with proper null safety - Enhanced constructor to accept both string and Widget titles
- Updated
copyWith()
method to includetitleWidget
parameter - Improved property equality and hashCode calculations
- Added
-
Serialization Handling
- Documented Widget serialization limitations in
toMap()
method - Excluded
titleWidget
from serialization as Widgets cannot be serialized - Maintained
title
string property for backward compatibility and persistence - Clear documentation on serialization behavior for Widget properties
- Documented Widget serialization limitations in
π§ Fixed #
-
Type Safety Improvements
- Fixed DialogExampleCard constructor to handle nullable DialogType properly
- Enhanced type checking and validation throughout Widget title implementation
- Improved null safety handling for optional Widget title parameters
- Better error handling for invalid title configurations
-
Widget Lifecycle Management
- Proper Widget title rendering across all dialog lifecycle states
- Consistent Widget title behavior during animations and transitions
- Enhanced memory management for Widget title objects
- Improved Widget disposal and cleanup patterns
π Documentation #
-
Enhanced API Documentation
- Comprehensive documentation for Widget title functionality
- Usage examples for rich text, icons, gradients, and custom layouts
- Migration guide for developers wanting to use Widget titles
- Best practices for Widget title design and performance
-
Example Code Updates
- Practical Widget title examples with real-world use cases
- Interactive demonstrations in the example application
- Code snippets showing different Widget title approaches
- Performance considerations and optimization tips
π― Use Cases Enabled #
The Widget title support enables numerous advanced dialog scenarios:
- Branding: Company logos or branded elements in dialog titles
- Status Indicators: Icons showing connection status, progress, or alerts
- Rich Typography: Multiple font styles, colors, and effects in titles
- Interactive Elements: Buttons or interactive controls within title areas
- Localization: Complex text layouts for right-to-left languages
- Accessibility: Enhanced screen reader support with semantic Widget structures
- Dynamic Content: Real-time updating titles with animations or data binding
π― Backward Compatibility #
- Fully Backward Compatible
- All existing
String
-based dialog methods continue to work unchanged - Existing
DialogConfig
constructors and properties remain functional - No breaking changes to existing dialog functionality
- Optional adoption of Widget title features
- Existing serialization and persistence mechanisms unaffected
- All existing
β‘ Performance #
- Optimized Widget Title Rendering
- Efficient Widget title resolution with minimal overhead
- Smart caching and reuse of Widget title instances
- Optimized memory usage for Widget title storage
- Performance-conscious Widget title lifecycle management
π Migration Guide #
This is a minor version update with full backward compatibility:
No Breaking Changes: All existing code continues to work without modification
Enhanced Usage Examples:
// Traditional string title (continues to work)
await dialogManager.showAlert<void>(
context: context,
title: 'Simple Title',
content: 'Dialog content',
);
// New Widget title capability
await dialogManager.showAlertWithWidget<void>(
context: context,
title: Row(
children: [
Icon(Icons.star, color: Colors.orange),
SizedBox(width: 8),
Text('Special Alert'),
],
),
content: 'Dialog with rich title',
);
// Rich text title
await dialogManager.showAlertWithWidget<void>(
context: context,
title: RichText(
text: TextSpan(
children: [
TextSpan(text: 'Bold ', style: TextStyle(fontWeight: FontWeight.bold)),
TextSpan(text: 'Colored ', style: TextStyle(color: Colors.blue)),
TextSpan(text: 'Title', style: TextStyle(decoration: TextDecoration.underline)),
],
),
),
content: 'Dialog content',
);
1.1.7 - 2025-07-20 #
π Added #
Enhanced Padding Control
- titlePadding Parameter Support
- Added missing
titlePadding
parameter toDialogConfig
for complete title spacing control - Full serialization support with
toMap()
andfromMap()
methods - Integrated with Material dialogs through
AlertDialog.titlePadding
property - Added interactive example in alert dialog parameters demo
- Added missing
π§ Changed #
Zero Padding Defaults for Complete Control
-
Comprehensive Zero Padding Defaults
- Changed
padding
(content padding) default fromEdgeInsets.fromLTRB(24, 20, 24, 24)
toEdgeInsets.zero
- Changed
titlePadding
default from nullable toEdgeInsets.zero
- Changed
actionsPadding
default from nullable toEdgeInsets.zero
- Changed
buttonPadding
default from nullable toEdgeInsets.zero
- Changed
iconPadding
default fromEdgeInsets.only(bottom: 16)
fallback toEdgeInsets.zero
- Changed
insetPadding
default from nullable toEdgeInsets.zero
- Changed
-
Property Type Safety Improvements
- Updated all padding properties from nullable
EdgeInsetsGeometry?
to non-nullableEdgeInsetsGeometry
- Enhanced type safety throughout configuration serialization and deserialization
- Guaranteed non-null padding values with sensible zero defaults
- Updated all padding properties from nullable
Enhanced Developer Experience
-
Predictable Dialog Layouts
- Removed unexpected default padding that users couldn't easily control
- Dialogs now render exactly as specified without unwanted spacing
- Complete control over every padding aspect of dialog appearance
- Consistent zero-based defaults across all padding properties
-
Improved Example Application
- Added "Zero Padding Default" demonstration button
- Enhanced examples showing both zero defaults and custom padding overrides
- Better educational content for understanding new padding behavior
π§ Fixed #
- Eliminated Hardcoded Padding Defaults
- Removed hardcoded content padding that couldn't be easily overridden
- Removed hardcoded icon padding fallbacks that added unwanted spacing
- Fixed inconsistent padding behavior across different dialog configurations
π Documentation #
- Enhanced API Documentation
- Updated examples to demonstrate zero padding defaults
- Added guidance on when and how to add custom padding
- Improved code examples showing padding customization patterns
π― Migration Guide #
This version introduces behavioral changes in dialog appearance:
What Changed
- Default Appearance: Dialogs now have zero padding by default instead of built-in spacing
- More Control: You now have complete control over all dialog spacing
- Predictable Layout: No more unexpected padding that couldn't be customized
Migration Steps
If you want the old padding behavior:
// Before (old defaults were automatic)
DialogConfig(
title: 'My Dialog',
content: 'Content',
)
// After (add padding explicitly for old appearance)
DialogConfig(
title: 'My Dialog',
content: 'Content',
padding: EdgeInsets.fromLTRB(24, 20, 24, 24), // Old content padding
titlePadding: EdgeInsets.fromLTRB(24, 24, 24, 0), // Optional title padding
actionsPadding: EdgeInsets.fromLTRB(8, 0, 8, 8), // Optional actions padding
)
If you prefer the new zero-padding approach:
// New default - zero padding everywhere
DialogConfig(
title: 'My Dialog',
content: 'Content',
// No padding = EdgeInsets.zero for all padding properties
)
// Add custom padding only where needed
DialogConfig(
title: 'My Dialog',
content: 'Content',
padding: EdgeInsets.all(16), // Custom content padding
titlePadding: EdgeInsets.only(bottom: 8), // Custom title spacing
)
β‘ Performance #
- Optimized Padding Handling
- Eliminated unnecessary null checks for padding properties
- More efficient padding resolution with guaranteed non-null values
- Reduced widget tree complexity with predictable padding behavior
π― Backward Compatibility #
- Configuration Compatibility
- All existing
DialogConfig
constructors continue to work - Existing code with explicit padding values remains unchanged
- Only affects dialogs that relied on automatic default padding
copyWith()
and serialization methods fully preserve existing behavior
- All existing
1.1.6 - 2025-07-20 #
π§ Fixed #
Dialog Default Action Removal
- Removed Unwanted Default Actions
- Fixed issue where Cupertino (iOS) dialogs automatically added a default "OK" action when no actions were provided
- Removed automatic default action behavior from
_buildCupertinoActions()
method inAdaptiveDialogManager
- Users can now create dialogs without any actions by simply not providing the
actions
parameter or passing an empty list - Respects user's explicit choice to have action-less dialogs
User Experience Improvements
- Enhanced Dialog Control
- Dialogs now display exactly as specified by the user without unwanted additions
- No more forced user interactions when dialogs are meant to be informational only
- Better alignment with user expectations for dialog behavior
π― Backward Compatibility #
- Fully Backward Compatible
- All existing dialogs with explicit actions continue to work exactly as before
- No breaking changes to existing functionality
- Only affects dialogs where actions were intentionally omitted
- Existing code continues to work without modification
β‘ Performance #
- Optimized Dialog Rendering
- Reduced unnecessary widget creation for unwanted default actions
- Cleaner widget tree when no actions are specified
- Improved memory usage by eliminating redundant action widgets
1.1.5 - 2025-07-20 #
π§ Fixed #
Type Safety Improvements
- Enhanced SnackbarConfig Type Safety
- Fixed potential type casting issues in
SnackbarConfig.fromMap()
method - Improved null safety handling for complex object parsing
- Enhanced error handling for malformed configuration data
- Better type validation for custom offset and margin parsing
- Fixed potential type casting issues in
Code Quality Enhancements
- Improved Configuration Parsing
- Enhanced robustness of configuration deserialization
- Better handling of edge cases in map-to-object conversion
- Improved error recovery for invalid configuration data
- Enhanced debugging information for configuration parsing issues
π― Backward Compatibility #
- Fully Backward Compatible
- All existing APIs maintain their current behavior
- No breaking changes to existing functionality
- Existing code continues to work without modification
- Internal improvements do not affect public API
β‘ Performance #
- Optimized Configuration Processing
- Improved parsing performance for complex configuration objects
- Better memory usage during configuration deserialization
- Enhanced error handling without performance impact
- More efficient type checking and validation
1.1.4 - 2025-07-07 #
π§ Fixed #
Complete Generic Type System Simplification
-
Removed Generic Types from Snackbar and Toast Systems
- Eliminated unnecessary generic type parameters from
SnackbarResult
class - Removed generic type parameters from
ToastResult
class - Simplified
SnackbarManager
interface by removing all generic type parameters - Simplified
ToastManager
interface by removing all generic type parameters - Updated
AdaptiveSnackbarManager
to use non-generic types throughout - Updated
AdaptiveToastManager
to use non-generic types throughout - Updated
SnackbarQueueManager
to use non-generic types throughout - Updated
ToastQueueManager
to use non-generic types throughout
- Eliminated unnecessary generic type parameters from
-
Enhanced Type Safety Through Simplification
- Replaced generic
T
type parameters withObject?
for data storage - Eliminated complex type casting and conversion logic
- Resolved type mismatch errors caused by generic type complexity
- Improved compiler optimization through cleaner type signatures
- Replaced generic
Architecture Improvements
-
Simplified API Design
- Consistent method signatures across all notification systems
- Unified approach to data handling with
Object?
type - Eliminated unnecessary complexity without losing functionality
- Better maintainability through reduced type system overhead
-
Better Error Handling
- Removed type-related error scenarios
- Simplified error propagation throughout the system
- Cleaner stack traces without generic type noise
- More predictable behavior in edge cases
Performance Enhancements
- Reduced Generic Type Overhead
- Eliminated generic type parameter resolution in hot paths
- Improved method call performance through simplified signatures
- Better memory usage patterns without complex type checking
- Faster compilation times due to reduced type complexity
π Added #
Helper Methods for Type Safety
-
SnackbarQueueManager Enhancements
- Added
_completeWithDismissedResult()
helper method for consistent result completion - Added
_completeWithCancelledResult()
helper method for error handling - Improved result handling with standardized completion patterns
- Added
-
ToastQueueManager Enhancements
- Added
_completeWithDismissedResult()
helper method for consistent result completion - Added
_completeWithCancelledResult()
helper method for error handling - Standardized result completion across all toast operations
- Added
π§ Changed #
Result Type Simplification
-
SnackbarResult Updates
- Changed from
SnackbarResult<T>
toSnackbarResult
- Updated
data
property fromT?
toObject?
- Simplified all factory methods to use non-generic types
- Maintained all existing functionality while removing complexity
- Changed from
-
ToastResult Updates
- Changed from
ToastResult<T>
toToastResult
- Updated
data
property fromT?
toObject?
- Simplified all factory methods to use non-generic types
- Preserved all existing behavior with cleaner implementation
- Changed from
Manager Interface Updates
-
SnackbarManager Interface
- Simplified all method signatures to return
Future<SnackbarResult?>
- Removed generic type parameters from all methods
- Maintained backward compatibility for existing usage patterns
- Cleaner API surface area for better developer experience
- Simplified all method signatures to return
-
ToastManager Interface
- Simplified all method signatures to return
Future<ToastResult?>
- Removed generic type parameters from all methods
- Consistent API design across all notification types
- Better alignment with actual usage patterns
- Simplified all method signatures to return
π Documentation #
- Enhanced Type System Documentation
- Updated API documentation to reflect simplified type usage
- Added examples of data casting when specific types are needed
- Clarified the rationale behind type system simplification
- Better guidance on when and how to use typed data
π§ͺ Code Quality #
- Improved Type Consistency
- Eliminated type mismatches between queue managers and completers
- Consistent use of
Object?
for data storage across all systems - Better alignment between interface definitions and implementations
- Reduced cognitive load for developers working with the codebase
π― Backward Compatibility #
- Fully Backward Compatible
- All existing APIs continue to work without modification
- No breaking changes to public interfaces
- Existing code using the notification systems remains functional
- Optional migration path for developers who want to use the simplified APIs
β‘ Performance #
- Optimized Type System
- Reduced memory overhead from generic type parameter storage
- Improved method call performance through simplified signatures
- Better garbage collection patterns with fewer type objects
- Faster compilation and IDE performance with reduced type complexity
π οΈ Technical Details #
Implementation Notes
-
Type Safety Approach
- Uses
Object?
as the universal data type for maximum flexibility - Developers can cast to specific types when needed:
(result.data as String?)
- Maintains null safety throughout the simplified type system
- Preserves all existing functionality while eliminating complexity
- Uses
-
Migration Strategy
- No migration required for existing code
- Generic type parameters are automatically handled by the new system
- Developers can gradually adopt the simplified APIs over time
- Full backward compatibility ensures smooth transitions
π Migration Guide #
This is a patch version update with full backward compatibility:
- No Breaking Changes: All existing code continues to work exactly as before
- Simplified Types: Generic type parameters are no longer needed but don't break existing code
- Enhanced Performance: Better performance through simplified type system
- Optional Adoption: New simplified APIs can be adopted gradually
Example Usage
// Before (still works)
final SnackbarResult<String>? result = await AdaptiveSnackbarManager.instance.showInfo(
context: context,
message: 'Hello World',
);
// After (simplified)
final SnackbarResult? result = await AdaptiveSnackbarManager.instance.showInfo(
context: context,
message: 'Hello World',
);
// Data casting when needed
if (result?.data != null) {
final String? message = result!.data as String?;
}
1.1.3 - 2025-07-07 #
π§ Fixed #
Generic Type Parameter Cleanup
-
Simplified Generic Type Parameters in Snackbar System
- Removed unnecessary generic type parameters from
dismissSnackbar()
method inSnackbarQueueManager
- Removed unnecessary generic type parameters from
_replaceSnackbar()
method inSnackbarQueueManager
- Simplified method signatures by removing redundant type parameters that were causing complexity
- Updated all method calls to use the simplified signatures throughout
AdaptiveSnackbarManager
- Removed unnecessary generic type parameters from
-
Type Safety Improvements
- Fixed type inconsistencies in snackbar result handling
- Improved type inference by using
Object?
instead of genericT?
where appropriate - Enhanced compiler optimization through cleaner type signatures
Code Quality Enhancements
- Method Signature Consistency
- Unified method signatures across snackbar queue management operations
- Removed redundant generic type constraints that were not providing additional safety
- Improved code maintainability through simplified method signatures
π Added #
Enhanced Example Application
-
New Login Example Page
- Added comprehensive login example demonstrating snackbar validation patterns
- Interactive demo showing different snackbar types based on email validation
- Real-world example of snackbar usage in form validation scenarios
- Educational content explaining validation-based snackbar messaging
-
Improved Navigation
- Added navigation to the new login example page from the home screen
- Enhanced feature card layout with the new login demonstration
- Better user experience with comprehensive example coverage
Developer Experience Improvements
- Enhanced Example Coverage
- Practical demonstration of snackbar usage patterns
- Real-world form validation examples with appropriate feedback
- Educational content for developers learning the package
π§ Technical Improvements #
Type System Enhancements
- Cleaner Generic Type Usage
- Removed unnecessary generic type parameters that were not providing value
- Improved method signatures for better IDE support and code completion
- Enhanced type safety through more appropriate use of
Object?
vs generic types
Performance Optimizations
- Reduced Generic Type Overhead
- Eliminated redundant type parameter resolution in hot paths
- Improved compiler optimization through simplified type signatures
- Better memory usage patterns in type-heavy operations
π Documentation #
- Enhanced Example Documentation
- New login example page with comprehensive explanations
- Practical validation patterns demonstrating snackbar usage
- Real-world scenarios for better developer understanding
π§ͺ Code Quality #
- Improved Type Consistency
- Consistent use of appropriate generic types throughout the codebase
- Better alignment between method signatures and their actual usage
- Enhanced code readability through simplified type expressions
π― Backward Compatibility #
- Fully Backward Compatible
- All existing APIs maintain their current behavior
- No breaking changes to existing functionality
- Existing code continues to work without modification
- Internal optimizations do not affect public API
β‘ Performance #
- Optimized Type System Usage
- Reduced unnecessary generic type parameter resolution
- Improved method call performance through simplified signatures
- Better compiler optimization opportunities
π― Migration Guide #
This is a patch version update with full backward compatibility:
- No Breaking Changes: All existing code continues to work without modification
- Internal Optimizations: Method signature improvements are internal-only
- Enhanced Examples: New login example page provides additional learning materials
- Optional Usage: New examples can be used optionally for reference
1.1.2 - 2025-07-05 #
π Added #
Debug Mode Enhancement
-
Comprehensive Debug Mode Support
- Added
enableDebugMode()
method toDialogManager
interface for detailed dialog logging - Added
disableDebugMode()
method toDialogManager
interface for turning off debug output - Added
enableDebugMode()
method toSnackbarManager
interface for detailed snackbar logging - Added
disableDebugMode()
method toSnackbarManager
interface for turning off debug output - Implemented debug mode methods in
AdaptiveDialogManager
with comprehensive logging - Implemented debug mode methods in
AdaptiveSnackbarManager
with comprehensive logging
- Added
-
Developer Experience Improvements
- Consistent debug mode functionality across all three managers (Toast, Snackbar, Dialog)
- Enhanced debugging capabilities with detailed operation logging
- Standardized debug logging patterns following the same approach as
AdaptiveToastManager
- Real-time debug information for troubleshooting dialog and snackbar operations
π§ Technical Improvements #
Interface Consistency
- Enhanced Manager Interfaces
- Updated
DialogManager
interface with debug mode methods for complete API consistency - Updated
SnackbarManager
interface with debug mode methods matching other manager interfaces - Maintained full backward compatibility with existing implementations
- Improved interface segregation with optional debug functionality
- Updated
Implementation Enhancements
-
AdaptiveDialogManager Debug Support
- Added
enableDebugMode()
implementation with debug state management - Added
disableDebugMode()
implementation with proper cleanup - Enhanced existing
_logDebug()
method integration for consistent logging - Improved developer experience with detailed dialog operation tracking
- Added
-
AdaptiveSnackbarManager Debug Support
- Added
enableDebugMode()
implementation with debug state management - Added
disableDebugMode()
implementation with proper cleanup - Enhanced existing
_logDebug()
method integration for consistent logging - Improved developer experience with detailed snackbar operation tracking
- Added
π Documentation #
- Enhanced API Documentation
- Complete documentation for new debug mode methods
- Usage examples for enabling and disabling debug mode
- Best practices for debug mode in development vs production
π― Backward Compatibility #
- Fully Backward Compatible
- All existing APIs maintain their current behavior
- New debug methods are additive and do not affect existing functionality
- No breaking changes to existing dialog, snackbar, or toast functionality
- Existing code continues to work without modification
β‘ Performance #
- Optimized Debug Implementation
- Debug mode methods have minimal performance impact when disabled
- Efficient logging system with conditional message generation
- No impact on production performance when debug mode is disabled
π§ͺ Developer Experience #
Consistent API Design
- Unified Debug Interface
- All three managers (
AdaptiveDialogManager
,AdaptiveSnackbarManager
,AdaptiveToastManager
) now have identical debug mode APIs - Consistent method naming and behavior across all manager implementations
- Standardized debug logging format for easier development and troubleshooting
- All three managers (
Usage Examples
// Enable debug mode for detailed logging
AdaptiveDialogManager.instance.enableDebugMode();
AdaptiveSnackbarManager.instance.enableDebugMode();
AdaptiveToastManager.instance.enableDebugMode(); // Already available
// Disable debug mode
AdaptiveDialogManager.instance.disableDebugMode();
AdaptiveSnackbarManager.instance.disableDebugMode();
AdaptiveToastManager.instance.disableDebugMode(); // Already available
π― Migration Guide #
This is a patch version update with full backward compatibility:
- No Breaking Changes: All existing code continues to work without modification
- New Features: Debug mode methods are optional additions to existing interfaces
- Enhanced Development: New debug capabilities improve development experience
- Optional Usage: Debug mode methods can be used optionally for enhanced logging
1.1.1 - 2025-02-07 #
π§ Fixed #
Critical Toast Dismissal Bug Fixes
-
Fixed Custom Content Toast Dismissal Issue
- Resolved critical bug where custom content toasts (like processing toasts with cancel buttons) would not dismiss when interactive elements were tapped
- Fixed toast ID mismatch between
ToastQueueManager
andAdaptiveToast
widget that prevented proper communication - Added proper toast ID propagation from queue manager to individual toast widgets
-
Fixed dismissToastsByTag Method
- Resolved broken
dismissToastsByTag()
implementation inAdaptiveToastManager
that was dismissing ALL active toasts instead of only toasts with matching tags - Made private dismissal methods (
_dismissToastsByType
,_dismissToastsByTag
) public inToastQueueManager
for proper access - Fixed tag-based filtering logic to correctly identify and dismiss only targeted toasts
- Resolved broken
-
Enhanced Toast State Communication
- Added state stream listening in
AdaptiveToast
widget to properly receive dismissal signals from queue manager - Implemented automatic dismissal animation trigger when queue manager sets toast status to "hiding"
- Fixed communication gap between queue manager's dismissal commands and individual widget responses
- Added state stream listening in
Context Consistency Improvements
-
Added Context Consistency Testing
- Implemented context consistency tests for dialog and toast managers similar to existing snackbar tests
- Added verification that dialogs and toasts position consistently regardless of which
BuildContext
is used (State vs Builder context) - Enhanced example applications with context consistency test sections
-
Fixed Context-Related Positioning Issues
- Ensured consistent toast and dialog positioning across different widget contexts
- Added debug logging for context-related operations for better troubleshooting
Development Experience Enhancements
-
Improved Debug Information
- Enhanced debug logging with more detailed toast dismissal tracking
- Added success/failure feedback for tag-based dismissal operations
- Improved error messages and dismissal reason tracking
-
Enhanced Example Application
- Added context consistency test UI for dialogs and toasts
- Improved user feedback with detailed snackbar messages showing dismissal results
- Enhanced debug output for better development experience
π§ Technical Improvements #
Toast Widget Architecture
- Enhanced AdaptiveToast Widget
- Added
toastId
parameter to constructor for proper ID synchronization - Implemented state stream subscription for listening to queue manager changes
- Added proper resource cleanup for state subscriptions in dispose method
- Maintained backward compatibility with optional
toastId
parameter
- Added
Queue Manager Improvements
-
ToastQueueManager API Enhancement
- Made
dismissToastsByType()
anddismissToastsByTag()
methods public for external access - Updated internal method calls to use new public method names
- Maintained existing functionality while improving API accessibility
- Made
-
AdaptiveToastManager Fixes
- Fixed broken delegation in
dismissToastsByType()
anddismissToastsByTag()
methods - Replaced incorrect "dismiss all toasts" logic with proper queue manager delegation
- Improved type safety and error handling in dismissal operations
- Fixed broken delegation in
π§ͺ Testing & Quality #
Enhanced Test Coverage
- Context Consistency Tests
- Added comprehensive context consistency testing for dialogs and toasts
- Implemented test cases for State context vs Builder context scenarios
- Added timing behavior tests across different contexts
Improved Example Application
- Enhanced Toast Showcase
- Added context consistency test section with visual indicators
- Improved custom content toast examples with working cancel buttons
- Enhanced debug information display with real-time status updates
π Documentation #
- Updated Code Examples
- Fixed custom content toast examples to show proper dismissal implementation
- Added context consistency testing examples
- Enhanced debugging and troubleshooting documentation
β‘ Performance #
- Optimized State Management
- Reduced unnecessary state updates through improved filtering logic
- Enhanced memory management with proper subscription cleanup
- Optimized tag-based dismissal operations for better performance
π― Backward Compatibility #
- Fully Backward Compatible
- All existing APIs maintain their current behavior
- New
toastId
parameter is optional and defaults to auto-generation - No breaking changes to existing toast, dialog, or snackbar functionality
- Existing code continues to work without modification
π Bug Resolution Summary #
This patch release resolves several critical issues that were affecting toast functionality:
- Custom Content Dismissal: Fixed the primary issue where toasts with interactive custom content (buttons, etc.) wouldn't dismiss properly
- Tag-Based Filtering: Restored proper tag-based dismissal functionality that was incorrectly dismissing all toasts
- State Synchronization: Resolved communication issues between queue manager and individual toast widgets
- Context Consistency: Ensured consistent behavior across different widget contexts
All fixes maintain full backward compatibility while significantly improving the reliability and user experience of the toast system.
1.1.0 - 2025-07-01 #
π Added #
Advanced Toast Timing System
-
Toast Timing Behavior Control
- New
ToastTimingBehavior
enum withindependent
anddependent
options - Independent timing: Each toast dismisses based on its own timer (classic behavior)
- Dependent timing: Older toasts pause when newer ones appear, resume when visible again
- Smart timing management for better user experience with multiple toasts
- New
-
Toast Display Mode Enhancement
- New
ToastDisplayMode
enum withstack
andcolumn
options - Enhanced
ToastConfig
withdisplayMode
parameter for explicit control - Backward compatibility maintained with existing
ToastLayout
enum - Extension methods for easy conversion between layout and display modes
- New
-
Toast Timing Manager
- New
ToastTimingManager
class for sophisticated timing control - Position-aware timer management for dependent timing behavior
- Automatic pause/resume functionality based on toast visibility
- Real-time timer debugging and monitoring capabilities
- Stream-based timer state management
- New
-
Enhanced Toast Configuration
- New
timingBehavior
parameter inToastConfig
with dependent timing as default - Updated factory constructors (
info
,success
,warning
,error
) with timing behavior support - Enhanced
copyWith
method to include all new timing-related properties - Improved type safety with comprehensive null checking
- New
-
Utility Enhancements
- New
IdGenerator
class for generating unique toast and dialog IDs - Support for timestamp-based, short alphanumeric, prefixed, and UUID-like ID generation
- Enhanced debugging capabilities with unique ID tracking
- New
Enhanced Snackbar System
-
Advanced Dismissible Configuration
- Enhanced
dismissible
property with smart auto-dismiss logic - New
autoDismiss
property for granular control over automatic dismissal dismissDirection
property for customizing swipe-to-dismiss behaviorshouldAutoDismiss
getter for intelligent dismissal logic based on snackbar type
- Enhanced
-
Animation System Improvements
- New
animationDuration
property for custom animation timing - New
animationCurve
property for custom animation curves - Platform-specific animation defaults with customization support
- Enhanced animation system with better performance and smoother transitions
- New
-
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
Developer Experience Improvements
-
Enhanced Debug Information
- Real-time toast timing information in debug mode
- Live timer status monitoring with pause/resume states
- Position-specific timing information display
- Enhanced debug information in example application
-
Improved Example Application
- New timing behavior selection controls in toast showcase
- Real-time debug information display with live updates
- Enhanced toast testing capabilities with timing behavior demonstration
- Interactive timing behavior controls with detailed descriptions
π§ Changed #
Toast System Improvements
-
Enhanced Toast Constants
- Updated
maxVisibleColumnToasts
from 3 to 4 for improved user experience - Enhanced default toast widths for better visibility across platforms
- Improved spacing constants for column layout mode
- Optimized animation durations for smoother transitions
- Updated
-
Toast Configuration Updates
- Default
timingBehavior
set todependent
for better multi-toast experience - Enhanced
effectiveDuration
calculation with timing behavior consideration - Improved
shouldAutoDismiss
logic with timing behavior awareness - Better integration between layout modes and timing behaviors
- Default
-
Widget Lifecycle Management
- Enhanced
AdaptiveToast
widget with timing manager integration - Automatic registration/unregistration with timing manager
- Improved memory management and resource cleanup
- Better animation controller handling with timing integration
- Enhanced
Configuration Model Enhancements
-
ToastConfig Model Updates
- New
timingBehavior
property with comprehensive factory constructor support - Enhanced
displayMode
property for explicit display control - Updated
toMap()
andfromMap()
methods with new properties - Improved
copyWith()
method for complete configuration copying - Enhanced equality operator and hashCode with new properties
- New
-
SnackbarConfig Model Updates
- New dismissible-related properties with comprehensive support
- Enhanced animation configuration properties
- Updated factory constructors with duration and dismissible support
- Improved configuration mapping and serialization
π§ Fixed #
-
Type Safety Improvements
- Fixed missing property errors in configuration models
- Enhanced null safety throughout toast and snackbar systems
- Improved error handling for invalid configuration combinations
- Better validation for timing and animation parameters
-
Configuration Consistency
- Ensured all new properties are properly mapped in serialization methods
- Fixed missing property handling in
fromMap()
factory constructors - Improved
copyWith()
method completeness across all models - Enhanced equality and hashCode implementations
π Documentation #
-
Enhanced API Documentation
- Comprehensive documentation for toast timing behavior system
- Detailed explanations of dependent vs independent timing modes
- Enhanced configuration examples with timing behavior usage
- Improved code examples in README and documentation
-
Example Application Updates
- Enhanced toast showcase page with timing behavior controls
- Real-time debugging information display
- Interactive examples demonstrating timing behavior differences
- Improved user interface for testing new features
π§ͺ Testing & Debugging #
-
Enhanced Debug Capabilities
- Real-time timer status monitoring and display
- Position-specific timing information tracking
- Enhanced debug mode with timing manager integration
- Improved error reporting and validation
-
Example Application Testing
- Comprehensive timing behavior testing interface
- Real-time debug information updates every 500ms
- Interactive controls for testing different timing scenarios
- Enhanced visual feedback for timing behavior demonstration
β‘ Performance #
-
Timing System Optimization
- Efficient timer management with minimal memory overhead
- Optimized position-based timer organization
- Smart timer cleanup and resource management
- Reduced timer creation/destruction cycles
-
Animation Performance
- Optimized animation curves for different platforms
- Improved animation duration defaults for better performance
- Enhanced animation lifecycle management
- Better memory usage in animation controllers
π― Migration Guide #
This is a minor version update with full backward compatibility:
- No Breaking Changes: All existing code continues to work without modification
- New Features: New timing behavior and configuration options are optional
- Default Behavior: Dependent timing behavior is now default but can be changed to independent
- Enhanced Configuration: New properties extend existing configuration without breaking changes
Optional Migration for Enhanced Features:
// Before (still works)
ToastConfig.info(
platformType: PlatformType.android,
message: 'Info message',
);
// After (enhanced with timing behavior)
ToastConfig.info(
platformType: PlatformType.android,
message: 'Info message',
timingBehavior: ToastTimingBehavior.independent, // Optional
);
1.0.4 - 2025-07-01 #
- Fix snackbar top position with safe area
1.0.3 - 2025-06-25 #
π§ Changed #
Snackbar Default Position Update
-
Default Position Changed from Bottom to Top
- Updated
SnackbarManager.showToast()
default position fromcenter
totop
- Updated
SnackbarManager.showCustom()
default position frombottom
totop
- Updated
SnackbarConfig
constructor default position frombottom
totop
- Updated
SnackbarConfig.fromMap()
fallback default frombottom
totop
- Updated
SnackbarConfig.custom()
factory method default frombottom
totop
- Updated
AdaptiveSnackbarManager.showCustom()
default parameter frombottom
totop
- Updated
-
Documentation Updates
- Updated
SnackbarPosition
enum documentation to marktop
as "(default)" - Removed "(default)" marker from
bottom
position in enum documentation
- Updated
π― Impact #
-
Backward Compatibility Maintained
- Existing code that explicitly sets position parameters will continue to work exactly as before
- Only affects snackbars where position is not explicitly specified
- No breaking changes to existing APIs or method signatures
-
Improved User Experience
- Snackbars now appear at the top by default, providing better visibility
- Consistent with modern mobile app design patterns
- Users can still override with any
SnackbarPosition
value as needed
π Migration #
No migration required. This change only affects the default behavior:
- Before:
showSnackbar(context, config)
β showed at bottom - After:
showSnackbar(context, config)
β shows at top - Override:
showSnackbar(context, config.copyWith(position: SnackbarPosition.bottom))
β shows at bottom
1.0.2 - 2025-06-25 #
π 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