copyWith method
StyleSheet
copyWith({
- dynamic borderRadius,
- dynamic borderTopLeftRadius,
- dynamic borderTopRightRadius,
- dynamic borderBottomLeftRadius,
- dynamic borderBottomRightRadius,
- Color? borderColor,
- dynamic borderWidth,
- Color? backgroundColor,
- DCFGradient? backgroundGradient,
- double? opacity,
- Color? shadowColor,
- double? shadowOpacity,
- dynamic shadowRadius,
- dynamic shadowOffsetX,
- dynamic shadowOffsetY,
- dynamic elevation,
- DCFHitSlop? hitSlop,
- bool? accessible,
- String? accessibilityLabel,
- String? testID,
- String? pointerEvents,
Create a copy of this StyleSheet with certain properties modified
Implementation
StyleSheet copyWith({
dynamic borderRadius,
dynamic borderTopLeftRadius,
dynamic borderTopRightRadius,
dynamic borderBottomLeftRadius,
dynamic borderBottomRightRadius,
Color? borderColor,
dynamic borderWidth,
Color? backgroundColor,
DCFGradient? backgroundGradient,
double? opacity,
Color? shadowColor,
double? shadowOpacity,
dynamic shadowRadius,
dynamic shadowOffsetX,
dynamic shadowOffsetY,
dynamic elevation,
DCFHitSlop? hitSlop,
bool? accessible,
String? accessibilityLabel,
String? testID,
String? pointerEvents, // Changed from bool? to String?
}) {
return StyleSheet(
borderRadius: borderRadius ?? this.borderRadius,
borderTopLeftRadius: borderTopLeftRadius ?? this.borderTopLeftRadius,
borderTopRightRadius: borderTopRightRadius ?? this.borderTopRightRadius,
borderBottomLeftRadius:
borderBottomLeftRadius ?? this.borderBottomLeftRadius,
borderBottomRightRadius:
borderBottomRightRadius ?? this.borderBottomRightRadius,
borderColor: borderColor ?? this.borderColor,
borderWidth: borderWidth ?? this.borderWidth,
backgroundColor: backgroundColor ?? this.backgroundColor,
backgroundGradient: backgroundGradient ?? this.backgroundGradient,
opacity: opacity ?? this.opacity,
shadowColor: shadowColor ?? this.shadowColor,
shadowOpacity: shadowOpacity ?? this.shadowOpacity,
shadowRadius: shadowRadius ?? this.shadowRadius,
shadowOffsetX: shadowOffsetX ?? this.shadowOffsetX,
shadowOffsetY: shadowOffsetY ?? this.shadowOffsetY,
elevation: elevation ?? this.elevation,
hitSlop: hitSlop ?? this.hitSlop,
accessible: accessible ?? this.accessible,
accessibilityLabel: accessibilityLabel ?? this.accessibilityLabel,
testID: testID ?? this.testID,
pointerEvents: pointerEvents ?? this.pointerEvents,
);
}