SnackBarProConfig class

Configuration class for SnackBarPro widget

Constructors

SnackBarProConfig({required String message, List<Color> gradientColors = const [Colors.deepPurple, Colors.purple], TextStyle? textStyle, Duration containerAnimationDuration = const Duration(milliseconds: 1000), Duration personAnimationDuration = const Duration(milliseconds: 400), int typingSpeed = 80, BorderRadius borderRadius = const BorderRadius.all(Radius.circular(12)), List<BoxShadow>? boxShadow, bool showPersonFigure = true, Color personFillColor = Colors.white, Color personStrokeColor = Colors.deepPurple, ImageProvider<Object>? personImage, Size personSize = const Size(50, 70), BoxFit personImageFit = BoxFit.cover, BorderRadius? personImageBorderRadius, double containerWidthFraction = 0.9, EdgeInsets padding = const EdgeInsets.all(16)})
const

Properties

borderRadius BorderRadius
Border radius for the container
final
boxShadow List<BoxShadow>?
Shadow for the container
final
containerAnimationDuration Duration
Duration for container expansion animation
final
containerWidthFraction double
Container width as a fraction of screen width (0.0 to 1.0)
final
defaultBoxShadow List<BoxShadow>
Default box shadow if none provided
no setter
defaultTextStyle TextStyle
Default text style if none provided
no setter
gradientColors List<Color>
Background gradient colors for the container
final
hashCode int
The hash code for this object.
no setterinherited
message String
The message to display with typing animation
final
padding EdgeInsets
Padding inside the container
final
personAnimationDuration Duration
Duration for person figure animation
final
personFillColor Color
Person figure colors (used when personImage is null)
final
personImage ImageProvider<Object>?
Custom image for person figure (overrides drawn person if provided)
final
personImageBorderRadius BorderRadius?
Border radius for custom person image
final
personImageFit BoxFit
How the custom image should be fitted within the person area
final
personSize Size
Size of the person figure (width and height)
final
personStrokeColor Color
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showPersonFigure bool
Whether to show the person figure
final
textStyle TextStyle?
Text style for the message
final
typingSpeed int
Duration between each character in typing animation (milliseconds)
final
useCustomImage bool
Whether to use custom image instead of drawn person
no setter

Methods

copyWith({String? message, List<Color>? gradientColors, TextStyle? textStyle, Duration? containerAnimationDuration, Duration? personAnimationDuration, int? typingSpeed, BorderRadius? borderRadius, List<BoxShadow>? boxShadow, bool? showPersonFigure, Color? personFillColor, Color? personStrokeColor, ImageProvider<Object>? personImage, Size? personSize, BoxFit? personImageFit, BorderRadius? personImageBorderRadius, double? containerWidthFraction, EdgeInsets? padding}) SnackBarProConfig
Create a copy of this config with modified values
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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