copyWith method

  1. @useResult
FToasterStyle copyWith({
  1. FVariantsDelta<FToastVariantConstraint, FToastVariant, FToastStyle, FToastStyleDelta>? toastStyles,
  2. double? max,
  3. EdgeInsetsGeometryDelta? padding,
  4. FToasterExpandBehavior? expandBehavior,
  5. Duration? expandHoverEnterDuration,
  6. Duration? expandHoverExitDuration,
  7. double? expandStartSpacing,
  8. double? expandSpacing,
  9. double? collapsedProtrusion,
  10. double? collapsedScale,
  11. FToasterMotionDelta? motion,
  12. FToastAlignment? toastAlignment,
})

Returns a copy of this FToasterStyle with the given properties replaced.

See customizing widget styles.

Parameters

Implementation

@useResult
FToasterStyle copyWith({
  FVariantsDelta<FToastVariantConstraint, FToastVariant, FToastStyle, FToastStyleDelta>? toastStyles,
  double? max,
  EdgeInsetsGeometryDelta? padding,
  FToasterExpandBehavior? expandBehavior,
  Duration? expandHoverEnterDuration,
  Duration? expandHoverExitDuration,
  double? expandStartSpacing,
  double? expandSpacing,
  double? collapsedProtrusion,
  double? collapsedScale,
  FToasterMotionDelta? motion,
  FToastAlignment? toastAlignment,
}) => .new(
  toastStyles: FToastStyles(toastStyles?.call(this.toastStyles) ?? this.toastStyles),
  max: max ?? this.max,
  padding: padding?.call(this.padding) ?? this.padding,
  expandBehavior: expandBehavior ?? this.expandBehavior,
  expandHoverEnterDuration: expandHoverEnterDuration ?? this.expandHoverEnterDuration,
  expandHoverExitDuration: expandHoverExitDuration ?? this.expandHoverExitDuration,
  expandStartSpacing: expandStartSpacing ?? this.expandStartSpacing,
  expandSpacing: expandSpacing ?? this.expandSpacing,
  collapsedProtrusion: collapsedProtrusion ?? this.collapsedProtrusion,
  collapsedScale: collapsedScale ?? this.collapsedScale,
  motion: motion?.call(this.motion) ?? this.motion,
  toastAlignment: toastAlignment ?? this.toastAlignment,
);