copyWith method
TButtonTheme
copyWith({
- TWidgetTheme? baseTheme,
- TButtonSize? size,
- TButtonShape? shape,
- ButtonStyle? buttonStyle,
- double? scaleOnPress,
Implementation
TButtonTheme copyWith({
TWidgetTheme? baseTheme,
TButtonSize? size,
TButtonShape? shape,
ButtonStyle? buttonStyle,
double? scaleOnPress,
}) {
final effectiveBaseTheme = baseTheme ?? this.baseTheme;
final effectiveSize = size ?? this.size;
final effectiveShape = shape ?? this.shape;
return TButtonTheme(
baseTheme: effectiveBaseTheme,
size: effectiveSize,
shape: effectiveShape,
buttonStyle: buttonStyle ?? buildButtonStyle(effectiveBaseTheme, effectiveShape, effectiveSize),
scaleOnPress: scaleOnPress ?? this.scaleOnPress,
);
}