ToastTheme class

Theme configuration for toast notification system.

Provides comprehensive styling properties for toast notifications including layout, positioning, animation behavior, and visual effects. These properties integrate with the design system and can be overridden at the widget level.

The theme supports advanced features like stacking behavior, expansion modes, and sophisticated animation timing for professional toast experiences.

Constructors

ToastTheme({int? maxStackedEntries, EdgeInsetsGeometry? padding, ExpandMode? expandMode, Offset? collapsedOffset, double? collapsedScale, Curve? expandingCurve, Duration? expandingDuration, double? collapsedOpacity, double? entryOpacity, double? spacing, BoxConstraints? toastConstraints})
Creates a ToastTheme.
const

Properties

collapsedOffset Offset?
Offset for collapsed toast positioning.
final
collapsedOpacity double?
Opacity level for collapsed toast entries.
final
collapsedScale double?
Scale factor for collapsed toast entries.
final
entryOpacity double?
Initial opacity for toast entry animations.
final
expandingCurve Curve?
Animation curve for toast expansion transitions.
final
expandingDuration Duration?
Duration for toast expansion animations.
final
expandMode ExpandMode?
Behavior mode for toast stack expansion.
final
hashCode int
The hash code for this object.
no setteroverride
maxStackedEntries int?
Maximum number of toast notifications to stack visually.
final
padding EdgeInsetsGeometry?
Padding around the toast notification area.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
spacing double?
Spacing between expanded toast entries.
final
toastConstraints BoxConstraints?
Size constraints for individual toast notifications.
final

Methods

copyWith({ValueGetter<int?>? maxStackedEntries, ValueGetter<EdgeInsetsGeometry?>? padding, ValueGetter<ExpandMode?>? expandMode, ValueGetter<Offset?>? collapsedOffset, ValueGetter<double?>? collapsedScale, ValueGetter<Curve?>? expandingCurve, ValueGetter<Duration?>? expandingDuration, ValueGetter<double?>? collapsedOpacity, ValueGetter<double?>? entryOpacity, ValueGetter<double?>? spacing, ValueGetter<BoxConstraints?>? toastConstraints}) ToastTheme
Type definition for toast content builder functions.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override