copyWith method
AntdBoxStyle
copyWith({
- EdgeInsets? padding,
- EdgeInsets? margin,
- double? opacity,
- Color? color,
- Border? border,
- BorderRadius? radius,
- TextStyle? textStyle,
- double? height,
- double? minHeight,
- double? width,
- double? minWidth,
- double? size,
- bool expand = false,
- bool shrink = false,
- List<
AntdBoxLayoutMode> ? layoutModes, - double? backdropFilter,
- List<
BoxShadow> ? shadows, - Gradient? gradient,
- Alignment? alignment,
- AntdVisibility? visibility,
- AntdHapticFeedback? hapticFeedback,
- AntdKitStyle? focusStyle,
- AntdKitStyle? disabledStyle,
- AntdKitStyle? feedbackStyle,
- ColorFilter? colorFilter,
- AntdTapOptions? options,
override
Implementation
@override
AntdBoxStyle copyWith(
{final EdgeInsets? padding,
final EdgeInsets? margin,
final double? opacity,
final Color? color,
final Border? border,
final BorderRadius? radius,
final TextStyle? textStyle,
final double? height,
final double? minHeight,
final double? width,
final double? minWidth,
final double? size,
final bool expand = false,
final bool shrink = false,
final List<AntdBoxLayoutMode>? layoutModes,
final double? backdropFilter,
final List<BoxShadow>? shadows,
final Gradient? gradient,
final Alignment? alignment,
final AntdVisibility? visibility,
final AntdHapticFeedback? hapticFeedback,
final AntdKitStyle? focusStyle,
final AntdKitStyle? disabledStyle,
final AntdKitStyle? feedbackStyle,
final ColorFilter? colorFilter,
final AntdTapOptions? options}) {
if (!inherit) {
return this;
}
TextStyle? mergeTextStyle;
if (this.textStyle == null) {
mergeTextStyle = textStyle;
} else {
mergeTextStyle = this.textStyle!.merge(textStyle);
}
return AntdBoxStyle(
padding: padding ?? this.padding,
margin: margin ?? this.margin,
opacity: opacity ?? this.opacity,
color: color ?? this.color,
border: border ?? this.border,
radius: radius ?? this.radius,
textStyle: mergeTextStyle,
height: height ?? this.height,
minHeight: minHeight ?? this.minHeight,
width: width ?? this.width,
minWidth: minWidth ?? this.minWidth,
size: size ?? this.size,
layoutModes: layoutModes ?? this.layoutModes,
backdropFilter: backdropFilter ?? this.backdropFilter,
shadows: shadows ?? this.shadows,
gradient: gradient ?? this.gradient,
alignment: alignment ?? this.alignment,
visibility: visibility ?? this.visibility,
hapticFeedback: hapticFeedback ?? this.hapticFeedback,
colorFilter: colorFilter ?? this.colorFilter,
focusStyle: this.focusStyle.merge(focusStyle),
feedbackStyle: this.feedbackStyle.merge(feedbackStyle),
disabledStyle: this.disabledStyle.merge(disabledStyle),
options: this.options == null ? options : this.options?.copyFrom(options),
);
}