copyWith method
复制并修改单元格属性
Implementation
HexCell copyWith({
HexCoordinate? coordinate,
Color? fillColor,
Color? borderColor,
double? borderWidth,
bool? enabled,
Map<String, dynamic>? data,
bool? isSelected,
bool? isOccupied,
}) {
return HexCell(
coordinate: coordinate ?? this.coordinate,
fillColor: fillColor ?? this.fillColor,
borderColor: borderColor ?? this.borderColor,
borderWidth: borderWidth ?? this.borderWidth,
enabled: enabled ?? this.enabled,
data: data ?? this.data,
isSelected: isSelected ?? this.isSelected,
isOccupied: isOccupied ?? this.isOccupied,
);
}