copyWith method
AntdKitStyle
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,
- ColorFilter? colorFilter,
Implementation
AntdKitStyle 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 ColorFilter? colorFilter}) {
if (!inherit) {
return this;
}
TextStyle? mergeTextStyle;
if (this.textStyle == null) {
mergeTextStyle = textStyle;
} else {
mergeTextStyle = this.textStyle!.merge(textStyle);
}
return AntdKitStyle(
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);
}