copyWith method
- Color? backgroundColor,
- Color? actionTextColor,
- Color? disabledActionTextColor,
- TextStyle? contentTextStyle,
- double? elevation,
- ShapeBorder? shape,
- SnackBarBehavior? behavior,
- double? width,
- EdgeInsets? insetPadding,
- bool? showCloseIcon,
- Color? closeIconColor,
- double? actionOverflowThreshold,
- Color? actionBackgroundColor,
- Color? disabledActionBackgroundColor,
- DismissDirection? dismissDirection,
Creates a copy of this object with the given fields replaced with the new values.
Implementation
SnackBarThemeData copyWith({
Color? backgroundColor,
Color? actionTextColor,
Color? disabledActionTextColor,
TextStyle? contentTextStyle,
double? elevation,
ShapeBorder? shape,
SnackBarBehavior? behavior,
double? width,
EdgeInsets? insetPadding,
bool? showCloseIcon,
Color? closeIconColor,
double? actionOverflowThreshold,
Color? actionBackgroundColor,
Color? disabledActionBackgroundColor,
DismissDirection? dismissDirection,
}) {
return SnackBarThemeData(
backgroundColor: backgroundColor ?? this.backgroundColor,
actionTextColor: actionTextColor ?? this.actionTextColor,
disabledActionTextColor: disabledActionTextColor ?? this.disabledActionTextColor,
contentTextStyle: contentTextStyle ?? this.contentTextStyle,
elevation: elevation ?? this.elevation,
shape: shape ?? this.shape,
behavior: behavior ?? this.behavior,
width: width ?? this.width,
insetPadding: insetPadding ?? this.insetPadding,
showCloseIcon: showCloseIcon ?? this.showCloseIcon,
closeIconColor: closeIconColor ?? this.closeIconColor,
actionOverflowThreshold: actionOverflowThreshold ?? this.actionOverflowThreshold,
actionBackgroundColor: actionBackgroundColor ?? this.actionBackgroundColor,
disabledActionBackgroundColor: disabledActionBackgroundColor ?? this.disabledActionBackgroundColor,
dismissDirection: dismissDirection ?? this.dismissDirection,
);
}