copyWith method

ToastrConfig copyWith({
  1. ToastrType? type,
  2. String? message,
  3. String? title,
  4. Duration? duration,
  5. Duration? extendedTimeout,
  6. bool? dismissible,
  7. bool? showCloseButton,
  8. Widget? customIcon,
  9. Color? backgroundColor,
  10. Color? textColor,
  11. Duration? showDuration,
  12. Duration? hideDuration,
  13. ToastrPosition? position,
  14. ToastrShowMethod? showMethod,
  15. ToastrHideMethod? hideMethod,
  16. Curve? showEasing,
  17. Curve? hideEasing,
  18. bool? showProgressBar,
  19. bool? preventDuplicates,
  20. String? duplicateKey,
  21. VoidCallback? onTap,
  22. VoidCallback? onDismiss,
  23. Widget? content,
  24. double? maxWidth,
  25. EdgeInsets? margin,
  26. Color? accentColor,
  27. BoxDecoration? containerDecoration,
  28. ToastrTheme? theme,
  29. bool? reverseOrder,
  30. ToastrAction? action,
  31. bool? enableHapticFeedback,
  32. HapticFeedbackType? hapticFeedbackType,
  33. SwipeDismissDirection? swipeDismissDirection,
  34. Widget enterAnimationBuilder(
    1. Widget child,
    2. Animation<double> animation
    )?,
  35. Widget exitAnimationBuilder(
    1. Widget child,
    2. Animation<double> animation
    )?,
  36. bool? compact,
  37. BorderRadius? borderRadius,
  38. bool? avoidKeyboard,
  39. double? stackOverlap,
  40. bool? showCircularProgress,
  41. double? gutter,
  42. ToastrIconTheme? iconTheme,
})

Creates a copy of this config with updated values

Implementation

ToastrConfig copyWith({
  ToastrType? type,
  String? message,
  String? title,
  Duration? duration,
  Duration? extendedTimeout,
  bool? dismissible,
  bool? showCloseButton,
  Widget? customIcon,
  Color? backgroundColor,
  Color? textColor,
  Duration? showDuration,
  Duration? hideDuration,
  ToastrPosition? position,
  ToastrShowMethod? showMethod,
  ToastrHideMethod? hideMethod,
  Curve? showEasing,
  Curve? hideEasing,
  bool? showProgressBar,
  bool? preventDuplicates,
  String? duplicateKey,
  VoidCallback? onTap,
  VoidCallback? onDismiss,
  Widget? content,
  double? maxWidth,
  EdgeInsets? margin,
  Color? accentColor,
  BoxDecoration? containerDecoration,
  ToastrTheme? theme,
  bool? reverseOrder,
  ToastrAction? action,
  bool? enableHapticFeedback,
  HapticFeedbackType? hapticFeedbackType,
  SwipeDismissDirection? swipeDismissDirection,
  Widget Function(Widget child, Animation<double> animation)?
      enterAnimationBuilder,
  Widget Function(Widget child, Animation<double> animation)?
      exitAnimationBuilder,
  bool? compact,
  BorderRadius? borderRadius,
  bool? avoidKeyboard,
  double? stackOverlap,
  bool? showCircularProgress,
  double? gutter,
  ToastrIconTheme? iconTheme,
}) => ToastrConfig(
  type: type ?? this.type,
  message: message ?? this.message,
  title: title ?? this.title,
  duration: duration ?? this.duration,
  extendedTimeout: extendedTimeout ?? this.extendedTimeout,
  dismissible: dismissible ?? this.dismissible,
  showCloseButton: showCloseButton ?? this.showCloseButton,
  customIcon: customIcon ?? this.customIcon,
  backgroundColor: backgroundColor ?? this.backgroundColor,
  textColor: textColor ?? this.textColor,
  showDuration: showDuration ?? this.showDuration,
  hideDuration: hideDuration ?? this.hideDuration,
  position: position ?? this.position,
  showMethod: showMethod ?? this.showMethod,
  hideMethod: hideMethod ?? this.hideMethod,
  showEasing: showEasing ?? this.showEasing,
  hideEasing: hideEasing ?? this.hideEasing,
  showProgressBar: showProgressBar ?? this.showProgressBar,
  preventDuplicates: preventDuplicates ?? this.preventDuplicates,
  duplicateKey: duplicateKey ?? this.duplicateKey,
  onTap: onTap ?? this.onTap,
  onDismiss: onDismiss ?? this.onDismiss,
  content: content ?? this.content,
  maxWidth: maxWidth ?? this.maxWidth,
  margin: margin ?? this.margin,
  accentColor: accentColor ?? this.accentColor,
  containerDecoration: containerDecoration ?? this.containerDecoration,
  theme: theme ?? this.theme,
  reverseOrder: reverseOrder ?? this.reverseOrder,
  action: action ?? this.action,
  enableHapticFeedback: enableHapticFeedback ?? this.enableHapticFeedback,
  hapticFeedbackType: hapticFeedbackType ?? this.hapticFeedbackType,
  swipeDismissDirection:
      swipeDismissDirection ?? this.swipeDismissDirection,
  enterAnimationBuilder:
      enterAnimationBuilder ?? this.enterAnimationBuilder,
  exitAnimationBuilder:
      exitAnimationBuilder ?? this.exitAnimationBuilder,
  compact: compact ?? this.compact,
  borderRadius: borderRadius ?? this.borderRadius,
  avoidKeyboard: avoidKeyboard ?? this.avoidKeyboard,
  stackOverlap: stackOverlap ?? this.stackOverlap,
  showCircularProgress: showCircularProgress ?? this.showCircularProgress,
  gutter: gutter ?? this.gutter,
  iconTheme: iconTheme ?? this.iconTheme,
);