copyWith method
- @useResult
- ImageFilter backgroundFilter()?,
- BoxDecoration? decoration,
- EdgeInsetsGeometry? insetPadding,
- FDialogContentStyle horizontalStyle(- FDialogContentStyle style
 
- FDialogContentStyle verticalStyle(- FDialogContentStyle style
 
- FDialogMotion motion(- FDialogMotion motion
 
Returns a copy of this FDialogStyle with the given properties replaced.
Consider using the CLI to generate a style.
Parameters
- FDialogStyle.backgroundFilter - An optional callback that takes the current animation transition value (0.0 to 1.0) and returns an ImageFilter that is used as the background. Defaults to null.
This is typically combined with a transparent/translucent background to create a glassmorphic effect.
Examples
// Blurred
(animation) => ImageFilter.blur(sigmaX: animation * 5, sigmaY: animation * 5);
// Solid color
(animation) => ColorFilter.mode(Colors.white.withValues(alpha: animation), BlendMode.srcOver);
// Tinted
(animation) => ColorFilter.mode(Colors.white.withValues(alpha: animation * 0.5), BlendMode.srcOver);
// Blurred & tinted
(animation) => ImageFilter.compose(
  outer: ImageFilter.blur(sigmaX: animation * 5, sigmaY: animation * 5),
  inner: ColorFilter.mode(Colors.white.withValues(alpha: animation * 0.5), BlendMode.srcOver),
);
- FDialogStyle.decoration - The decoration.
- FDialogStyle.insetPadding - The inset padding.
- FDialogStyle.horizontalStyle - The horizontal dialog content's style.
- FDialogStyle.verticalStyle - The vertical dialog content's style.
- FDialogStyle.motion - Motion-related properties.
Implementation
@useResult
FDialogStyle copyWith({
  ImageFilter Function(double)? backgroundFilter,
  BoxDecoration? decoration,
  EdgeInsetsGeometry? insetPadding,
  FDialogContentStyle Function(FDialogContentStyle style)? horizontalStyle,
  FDialogContentStyle Function(FDialogContentStyle style)? verticalStyle,
  FDialogMotion Function(FDialogMotion motion)? motion,
}) => FDialogStyle(
  backgroundFilter: backgroundFilter ?? this.backgroundFilter,
  decoration: decoration ?? this.decoration,
  insetPadding: insetPadding ?? this.insetPadding,
  horizontalStyle: horizontalStyle != null ? horizontalStyle(this.horizontalStyle) : this.horizontalStyle,
  verticalStyle: verticalStyle != null ? verticalStyle(this.verticalStyle) : this.verticalStyle,
  motion: motion != null ? motion(this.motion) : this.motion,
);