copyWith method
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,
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,
);