copyWith method
- @useResult
- double? max,
- EdgeInsetsGeometry? padding,
- FToasterExpandBehavior? expandBehavior,
- Duration? expandHoverEnterDuration,
- Duration? expandHoverExitDuration,
- double? expandStartSpacing,
- double? expandSpacing,
- double? collapsedProtrusion,
- double? collapsedScale,
- FToasterMotion motion(
- FToasterMotion motion
- FToastAlignment? toastAlignment,
- FToastStyle toastStyle(
- FToastStyle style
Returns a copy of this FToasterStyle with the given properties replaced.
Consider using the CLI to generate a style.
Parameters
- FToasterStyle.max - The maximum number of entries shown per FToastAlignment.
- FToasterStyle.padding - The toaster's padding.
- FToasterStyle.expandBehavior - The toaster's expansion behavior.
- FToasterStyle.expandHoverEnterDuration - The duration to wait after entering the toaster before expanding the toasts.
- FToasterStyle.expandHoverExitDuration - The duration to wait after exiting the toaster before collapsing the toasts.
- FToasterStyle.expandStartSpacing - The spacing below or above the toasts when they are expanded.
- FToasterStyle.expandSpacing - The spacing between the toasts when they are expanded.
- FToasterStyle.collapsedProtrusion - The protrusion of the collapsed toasts behind the front toast.
- FToasterStyle.collapsedScale - The scaling factor pf the collapsed toasts behind the front toast.
- FToasterStyle.motion - The motion-related properties.
- FToasterStyle.toastAlignment - The toast's alignment relative to a FToaster.
- FToasterStyle.toastStyle - The contained toasts' style.
Implementation
@useResult
FToasterStyle copyWith({
double? max,
EdgeInsetsGeometry? padding,
FToasterExpandBehavior? expandBehavior,
Duration? expandHoverEnterDuration,
Duration? expandHoverExitDuration,
double? expandStartSpacing,
double? expandSpacing,
double? collapsedProtrusion,
double? collapsedScale,
FToasterMotion Function(FToasterMotion motion)? motion,
FToastAlignment? toastAlignment,
FToastStyle Function(FToastStyle style)? toastStyle,
}) => FToasterStyle(
max: max ?? this.max,
padding: 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 != null ? motion(this.motion) : this.motion,
toastAlignment: toastAlignment ?? this.toastAlignment,
toastStyle: toastStyle != null ? toastStyle(this.toastStyle) : this.toastStyle,
);