copyWith method
Creates a new instance of the ReportCell with updated dimensions.
This method is crucial for the dynamic resizing logic within ReportMaker and ReportDesignBuilder. It allows the engine to adjust cell sizes during the layout phase while preserving the cell's internal data.
Implementation
@override
NrbCustomWidgetCell copyWith({
double? cellWidth,
double? cellHeight,
double? textSize, // Ignored here as sizing is handled by the custom widget
}) {
return NrbCustomWidgetCell(
key: key,
exportText: exportText,
cellWidth: cellWidth ?? this.cellWidth,
cellHeight: cellHeight ?? this.cellHeight,
alignment: alignment,
backgroundColor: backgroundColor,
textColor: textColor,
isBold: isBold,
child: child,
);
}