copyWith method

  1. @override
FlashBarTheme copyWith({
  1. FlashPosition? position,
  2. FlashBehavior? behavior,
  3. EdgeInsets? margin,
  4. bool? enableVerticalDrag,
  5. bool? enableHorizontalDrag,
  6. Curve? forwardAnimationCurve,
  7. Curve? reverseAnimationCurve,
  8. Color? backgroundColor,
  9. double? elevation,
  10. Color? shadowColor,
  11. Color? surfaceTintColor,
  12. ShapeBorder? shape,
  13. EdgeInsets? padding,
  14. Color? iconColor,
  15. TextStyle? titleTextStyle,
  16. TextStyle? contentTextStyle,
})
override

Creates a copy of this theme extension with the given fields replaced by the non-null parameter values.

Implementation

@override
FlashBarTheme copyWith({
  FlashPosition? position,
  FlashBehavior? behavior,
  EdgeInsets? margin,
  bool? enableVerticalDrag,
  bool? enableHorizontalDrag,
  Curve? forwardAnimationCurve,
  Curve? reverseAnimationCurve,
  Color? backgroundColor,
  double? elevation,
  Color? shadowColor,
  Color? surfaceTintColor,
  ShapeBorder? shape,
  EdgeInsets? padding,
  Color? iconColor,
  TextStyle? titleTextStyle,
  TextStyle? contentTextStyle,
}) {
  return FlashBarTheme(
    margin: margin ?? this.margin,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    elevation: elevation ?? this.elevation,
    shadowColor: shadowColor ?? this.shadowColor,
    surfaceTintColor: surfaceTintColor ?? this.surfaceTintColor,
    shape: shape ?? this.shape,
    padding: padding ?? this.padding,
    iconColor: iconColor ?? this.iconColor,
    titleTextStyle: titleTextStyle ?? this.titleTextStyle,
    contentTextStyle: contentTextStyle ?? this.contentTextStyle,
  );
}