copyWith method

ShadButtonTheme copyWith({
  1. MouseCursor? cursor,
  2. ShadButtonSize? size,
  3. ShadButtonSizesTheme? sizesTheme,
  4. Color? backgroundColor,
  5. Color? hoverBackgroundColor,
  6. Color? foregroundColor,
  7. Color? hoverForegroundColor,
  8. Color? pressedBackgroundColor,
  9. Color? pressedForegroundColor,
  10. List<BoxShadow>? shadows,
  11. Gradient? gradient,
  12. TextDecoration? textDecoration,
  13. TextDecoration? hoverTextDecoration,
  14. ShadDecoration? decoration,
  15. double? width,
  16. double? height,
  17. Duration? longPressDuration,
  18. ShadHoverStrategies? hoverStrategies,
  19. MainAxisAlignment? mainAxisAlignment,
  20. CrossAxisAlignment? crossAxisAlignment,
  21. TextDirection? textDirection,
  22. double? gap,
  23. bool? expands,
  24. TextStyle? textStyle,
})
inherited

Implementation

ShadButtonTheme copyWith({
  MouseCursor? cursor,
  ShadButtonSize? size,
  ShadButtonSizesTheme? sizesTheme,
  Color? backgroundColor,
  Color? hoverBackgroundColor,
  Color? foregroundColor,
  Color? hoverForegroundColor,
  Color? pressedBackgroundColor,
  Color? pressedForegroundColor,
  List<BoxShadow>? shadows,
  Gradient? gradient,
  TextDecoration? textDecoration,
  TextDecoration? hoverTextDecoration,
  ShadDecoration? decoration,
  double? width,
  double? height,
  Duration? longPressDuration,
  ShadHoverStrategies? hoverStrategies,
  MainAxisAlignment? mainAxisAlignment,
  CrossAxisAlignment? crossAxisAlignment,
  TextDirection? textDirection,
  double? gap,
  bool? expands,
  TextStyle? textStyle,
}) {
  final _this = (this as ShadButtonTheme);

  return ShadButtonTheme(
    cursor: cursor ?? _this.cursor,
    size: size ?? _this.size,
    sizesTheme: sizesTheme ?? _this.sizesTheme,
    backgroundColor: backgroundColor ?? _this.backgroundColor,
    hoverBackgroundColor: hoverBackgroundColor ?? _this.hoverBackgroundColor,
    foregroundColor: foregroundColor ?? _this.foregroundColor,
    hoverForegroundColor: hoverForegroundColor ?? _this.hoverForegroundColor,
    pressedBackgroundColor:
        pressedBackgroundColor ?? _this.pressedBackgroundColor,
    pressedForegroundColor:
        pressedForegroundColor ?? _this.pressedForegroundColor,
    shadows: shadows ?? _this.shadows,
    gradient: gradient ?? _this.gradient,
    textDecoration: textDecoration ?? _this.textDecoration,
    hoverTextDecoration: hoverTextDecoration ?? _this.hoverTextDecoration,
    decoration: decoration ?? _this.decoration,
    width: width ?? _this.width,
    height: height ?? _this.height,
    longPressDuration: longPressDuration ?? _this.longPressDuration,
    hoverStrategies: hoverStrategies ?? _this.hoverStrategies,
    mainAxisAlignment: mainAxisAlignment ?? _this.mainAxisAlignment,
    crossAxisAlignment: crossAxisAlignment ?? _this.crossAxisAlignment,
    textDirection: textDirection ?? _this.textDirection,
    gap: gap ?? _this.gap,
    expands: expands ?? _this.expands,
    textStyle: textStyle ?? _this.textStyle,
  );
}