copyWith method

ToastificationThemeData copyWith({
  1. BaseStandardToastStyle? toastStyle,
  2. TextDirection? direction,
  3. bool? showProgressBar,
  4. bool? applyBlurEffect,
  5. bool? showIcon,
  6. ProgressIndicatorThemeData? progressIndicatorTheme,
})

Creates a copy of this theme data with the given fields replaced with new values.

This method is useful for creating variations of the existing theme while maintaining the values of unspecified fields.

Implementation

ToastificationThemeData copyWith({
  BaseStandardToastStyle? toastStyle,
  TextDirection? direction,
  bool? showProgressBar,
  bool? applyBlurEffect,
  bool? showIcon,
  ProgressIndicatorThemeData? progressIndicatorTheme,
}) {
  return ToastificationThemeData(
    toastStyle: toastStyle ?? this.toastStyle,
    flutterTheme: flutterTheme,
    direction: direction ?? this.direction,
    showProgressBar: showProgressBar ?? this.showProgressBar,
    applyBlurEffect: applyBlurEffect ?? this.applyBlurEffect,
    showIcon: showIcon ?? this.showIcon,
  );
}