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,
})

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,
}) => 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,
);