copyWith method

LiquidGlassSettings copyWith({
  1. double? blendPx,
  2. double? refractStrength,
  3. double? distortFalloffPx,
  4. double? distortExponent,
  5. double? blurRadiusPx,
  6. double? specAngle,
  7. double? specStrength,
  8. double? specPower,
  9. double? specWidth,
  10. double? lightbandOffsetPx,
  11. double? lightbandWidthPx,
  12. double? lightbandStrength,
  13. Color? lightbandColor,
})

Creates a copy of this settings object with the given fields replaced with new values.

Implementation

LiquidGlassSettings copyWith({
  double? blendPx,
  double? refractStrength,
  double? distortFalloffPx,
  double? distortExponent,
  double? blurRadiusPx,
  double? specAngle,
  double? specStrength,
  double? specPower,
  double? specWidth,
  double? lightbandOffsetPx,
  double? lightbandWidthPx,
  double? lightbandStrength,
  Color? lightbandColor,
}) {
  return LiquidGlassSettings(
    blendPx: blendPx ?? this.blendPx,
    refractStrength: refractStrength ?? this.refractStrength,
    distortFalloffPx: distortFalloffPx ?? this.distortFalloffPx,
    distortExponent: distortExponent ?? this.distortExponent,
    blurRadiusPx: blurRadiusPx ?? this.blurRadiusPx,
    specAngle: specAngle ?? this.specAngle,
    specStrength: specStrength ?? this.specStrength,
    specPower: specPower ?? this.specPower,
    specWidth: specWidth ?? this.specWidth,
    lightbandOffsetPx: lightbandOffsetPx ?? this.lightbandOffsetPx,
    lightbandWidthPx: lightbandWidthPx ?? this.lightbandWidthPx,
    lightbandStrength: lightbandStrength ?? this.lightbandStrength,
    lightbandColor: lightbandColor ?? this.lightbandColor,
  );
}