copyWith method
VButton
copyWith({
- void onTap()?,
- void onDoubleTap()?,
- void onLongPress()?,
- String? label,
- Widget? iconPreffix,
- Widget? iconSuffix,
- VButtonShape? shape,
- VButtonColor? color,
- VButtonSize? size,
- VButtonState? state,
- VButtonLayout? layout,
- VButtonType? border,
- VButtonLoadingType? loadingType,
- TextStyle? textStyle,
- Color? backgroundColor,
- Color? forgroundColor,
- BorderRadius? borderRadius,
- EdgeInsetsGeometry? padding,
- Color? loadingIconColor,
- double? loadingIconStrokeWidth,
- Color? iconPreffixColor,
- Color? iconSuffixColor,
- Color? splashColor,
Implementation
VButton copyWith({
void Function()? onTap,
void Function()? onDoubleTap,
void Function()? onLongPress,
String? label,
Widget? iconPreffix,
Widget? iconSuffix,
VButtonShape? shape,
VButtonColor? color,
VButtonSize? size,
VButtonState? state,
VButtonLayout? layout,
VButtonType? border,
VButtonLoadingType? loadingType,
TextStyle? textStyle,
// =====
Color? backgroundColor,
Color? forgroundColor,
BorderRadius? borderRadius,
EdgeInsetsGeometry? padding,
Color? loadingIconColor,
double? loadingIconStrokeWidth,
Color? iconPreffixColor,
Color? iconSuffixColor,
Color? splashColor,
}) {
return VButton._(
onTap: onTap ?? this.onTap,
onDoubleTap: onDoubleTap ?? this.onDoubleTap,
onLongPress: onLongPress ?? this.onLongPress,
label: label ?? this.label,
iconPreffix: iconPreffix ?? this.iconPreffix,
iconSuffix: iconSuffix ?? this.iconSuffix,
shape: shape ?? this.shape,
color: color ?? this.color,
size: size ?? this.size,
state: state ?? this.state,
layout: layout ?? this.layout,
type: border ?? type,
loadingType: loadingType ?? this.loadingType,
textStyle: textStyle ?? this.textStyle,
// ======
backgroundColor: backgroundColor ?? this.backgroundColor,
forgroundColor: forgroundColor ?? this.forgroundColor,
borderRadius: borderRadius ?? this.borderRadius,
padding: padding ?? this.padding,
loadingIconColor: loadingIconColor ?? this.loadingIconColor,
loadingIconStrokeWidth: loadingIconStrokeWidth ?? this.loadingIconStrokeWidth,
iconPreffixColor: iconPreffixColor ?? this.iconPreffixColor,
iconSuffixColor: iconSuffixColor ?? this.iconSuffixColor,
splashColor: splashColor ?? this.splashColor,
);
}