copyWith method
复制并修改配置
Implementation
HexGridConfig copyWith({
int? columns,
int? rows,
double? hexSize,
HexOrientation? orientation,
bool? showGridLines,
Color? gridLineColor,
double? gridLineWidth,
Color? fillColor,
double? spacing,
bool? enableInteraction,
}) {
return HexGridConfig(
columns: columns ?? this.columns,
rows: rows ?? this.rows,
hexSize: hexSize ?? this.hexSize,
orientation: orientation ?? this.orientation,
showGridLines: showGridLines ?? this.showGridLines,
gridLineColor: gridLineColor ?? this.gridLineColor,
gridLineWidth: gridLineWidth ?? this.gridLineWidth,
fillColor: fillColor ?? this.fillColor,
spacing: spacing ?? this.spacing,
enableInteraction: enableInteraction ?? this.enableInteraction,
);
}