copyWith method
GlassStyle
copyWith(
{ - double? rim,
- double? curve,
- double? depth,
- double? dispersion,
- double? blur,
- double? saturation,
- Color? tint,
- double? specular,
- Offset? light,
- double? edgeDark,
- double? shadow,
- double? shadowBlur,
- Offset? shadowOffset,
})
Implementation
GlassStyle copyWith({
double? rim,
double? curve,
double? depth,
double? dispersion,
double? blur,
double? saturation,
Color? tint,
double? specular,
Offset? light,
double? edgeDark,
double? shadow,
double? shadowBlur,
Offset? shadowOffset,
}) {
final r = rim ?? this.rim;
final c = curve ?? this.curve;
final dp = depth ?? this.depth;
final d = dispersion ?? this.dispersion;
final b = blur ?? this.blur;
final sat = saturation ?? this.saturation;
final t = tint ?? this.tint;
final s = specular ?? this.specular;
final l = light ?? this.light;
final ed = edgeDark ?? this.edgeDark;
final sh = shadow ?? this.shadow;
final sb = shadowBlur ?? this.shadowBlur;
final so = shadowOffset ?? this.shadowOffset;
if (r == this.rim &&
c == this.curve &&
dp == this.depth &&
d == this.dispersion &&
b == this.blur &&
sat == this.saturation &&
t == this.tint &&
s == this.specular &&
l == this.light &&
ed == this.edgeDark &&
sh == this.shadow &&
sb == this.shadowBlur &&
so == this.shadowOffset) {
return this;
}
return GlassStyle(
rim: r,
curve: c,
depth: dp,
dispersion: d,
blur: b,
saturation: sat,
tint: t,
specular: s,
light: l,
edgeDark: ed,
shadow: sh,
shadowBlur: sb,
shadowOffset: so,
);
}