copyWithToggle method
Neu
copyWithToggle({
- Color? color,
- int? depth,
- double? spread,
- Alignment? lightSource,
- bool? isToggled,
- bool? isFlat,
- bool? isSuper,
- double? depthMultiplier,
- double? spreadMultiplier,
- NeuTextSpec? neuTextSpec,
- BorderRadius? borderRadius,
- ShapeBorder? shape,
📋 Create a new Neu.toggle
object that has the same properties as this
one except for any optional parameters passed through this
copyWithToggle method.
Implementation
Neu copyWithToggle({
Color? color,
int? depth,
double? spread,
Alignment? lightSource,
bool? isToggled,
bool? isFlat,
bool? isSuper,
double? depthMultiplier,
double? spreadMultiplier,
NeuTextSpec? neuTextSpec,
BorderRadius? borderRadius,
ShapeBorder? shape,
}) {
return Neu.toggle(
color: color ?? this.color,
depth: depth ?? this.depth,
spread: spread ?? this.spread,
lightSource: lightSource ?? this.lightSource,
isToggled: isToggled ?? _isToggled ?? false,
isFlat: isFlat ?? _isFlat ?? false,
isSuper: isSuper ?? _isSuper ?? false,
depthMultiplier:
depthMultiplier ?? _depthMultiplier ?? defaultDepthMultiplier,
spreadMultiplier:
spreadMultiplier ?? _spreadMultiplier ?? defaultSpreadMultiplier,
neuTextSpec: neuTextSpec ?? this.neuTextSpec,
borderRadius: borderRadius ?? this.borderRadius,
shape: shape ?? this.shape,
);
}