copyWith method
Style
copyWith({
- Alignment? alignment,
- Dimension? width,
- Dimension? height,
- EdgeInsets? margin,
- EdgeInsets? padding,
- bool? visible,
- double? opacity,
- Decoration? backgroundDecoration,
- Decoration? foregroundDecoration,
- List<
ShapeShadow> ? shadows, - List<
ShapeShadow> ? insetShadows, - MorphableShapeBorder? shapeBorder,
- SmoothMatrix4? transform,
- Alignment? transformAlignment,
- Alignment? childAlignment,
- DynamicTextStyle? textStyle,
- TextAlign? textAlign,
- Gradient? shaderGradient,
- ImageFilter? imageFilter,
- ImageFilter? backdropFilter,
- SystemMouseCursor? mouseCursor,
Implementation
Style copyWith({
Alignment? alignment,
Dimension? width,
Dimension? height,
EdgeInsets? margin,
EdgeInsets? padding,
bool? visible,
double? opacity,
Decoration? backgroundDecoration,
Decoration? foregroundDecoration,
List<ShapeShadow>? shadows,
List<ShapeShadow>? insetShadows,
MorphableShapeBorder? shapeBorder,
SmoothMatrix4? transform,
Alignment? transformAlignment,
Alignment? childAlignment,
DynamicTextStyle? textStyle,
TextAlign? textAlign,
Gradient? shaderGradient,
ImageFilter? imageFilter,
ImageFilter? backdropFilter,
SystemMouseCursor? mouseCursor,
}) {
return Style(
alignment: alignment ?? this.alignment,
width: width ?? this.width,
height: height ?? this.height,
margin: margin ?? this.margin,
padding: padding ?? this.padding,
visible: visible ?? this.visible,
opacity: opacity ?? this.opacity,
backgroundDecoration: backgroundDecoration ?? this.backgroundDecoration,
foregroundDecoration: foregroundDecoration ?? this.foregroundDecoration,
shadows: shadows ?? this.shadows,
insetShadows: insetShadows ?? this.insetShadows,
shapeBorder: shapeBorder ?? this.shapeBorder,
transform: transform ?? this.transform,
transformAlignment: transformAlignment ?? this.transformAlignment,
childAlignment: childAlignment ?? this.childAlignment,
textStyle: textStyle ?? this.textStyle,
textAlign: textAlign ?? this.textAlign,
shaderGradient: shaderGradient ?? this.shaderGradient,
imageFilter: imageFilter ?? this.imageFilter,
backdropFilter: backdropFilter ?? this.backdropFilter,
mouseCursor: mouseCursor ?? this.mouseCursor,
);
}