copyWith method
TButtonTheme
copyWith({
- TWidgetTheme? baseTheme,
- TSize? size,
- TButtonShape? shape,
- ButtonStyle? buttonStyle,
- double? scaleOnPress,
- Gradient? gradient,
- double? elevation,
- Color? shadowColor,
Implementation
TButtonTheme copyWith({
TWidgetTheme? baseTheme,
TSize? size,
TButtonShape? shape,
ButtonStyle? buttonStyle,
double? scaleOnPress,
Gradient? gradient,
double? elevation,
Color? shadowColor,
}) {
final effectiveBaseTheme = baseTheme ?? this.baseTheme;
final effectiveSize = size ?? this.size;
final effectiveShape = shape ?? this.shape;
final effectiveElevation = elevation ?? this.elevation;
final effectiveShadowColor = shadowColor ?? this.shadowColor;
return TButtonTheme(
baseTheme: effectiveBaseTheme,
size: effectiveSize,
shape: effectiveShape,
buttonStyle: buttonStyle ??
buildButtonStyle(
effectiveBaseTheme,
effectiveShape,
effectiveSize,
elevation: effectiveElevation,
shadowColor: effectiveShadowColor,
),
scaleOnPress: scaleOnPress ?? this.scaleOnPress,
gradient: gradient ?? this.gradient,
elevation: effectiveElevation,
shadowColor: effectiveShadowColor,
);
}