copyWith method

StyleSheet copyWith({
  1. dynamic borderRadius,
  2. dynamic borderTopLeftRadius,
  3. dynamic borderTopRightRadius,
  4. dynamic borderBottomLeftRadius,
  5. dynamic borderBottomRightRadius,
  6. Color? borderColor,
  7. dynamic borderWidth,
  8. Color? backgroundColor,
  9. DCFGradient? backgroundGradient,
  10. double? opacity,
  11. Color? shadowColor,
  12. double? shadowOpacity,
  13. dynamic shadowRadius,
  14. dynamic shadowOffsetX,
  15. dynamic shadowOffsetY,
  16. dynamic elevation,
  17. DCFHitSlop? hitSlop,
  18. bool? accessible,
  19. String? accessibilityLabel,
  20. String? testID,
  21. 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,
  );
}