copyWith method
Implementation
@override
TextFieldCell copyWith({
double? cellWidth,
double? cellHeight,
double? textSize,
}) {
return TextFieldCell(
key: key,
// CRITICAL: Pass the existing controller so text is not lost on resize!
controller: controller,
onChanged: onChanged,
cellWidth: cellWidth ?? this.cellWidth,
cellHeight: cellHeight ?? this.cellHeight,
textSize: textSize ?? this.textSize,
textAlignment: textAlignment,
backgroundColor: backgroundColor,
textColor: textColor,
borderColor: borderColor,
isBold: isBold,
decoration: decoration,
// 3. CRITICAL: Pass the new properties so they persist on resize!
keyboardType: keyboardType,
inputFormatters: inputFormatters,
);
}