copyWith method

HeatmapGradient copyWith({
  1. List<HeatmapGradientColor>? colorsParam,
  2. int? colorMapSizeParam,
})

Creates a new HeatmapGradient object whose values are the same as this instance, unless overwritten by the specified parameters.

Implementation

HeatmapGradient copyWith({
  List<HeatmapGradientColor>? colorsParam,
  int? colorMapSizeParam,
}) {
  return HeatmapGradient(
    colorsParam ?? colors,
    colorMapSize: colorMapSizeParam ?? colorMapSize,
  );
}