copyWith method

LegendConfig copyWith({
  1. LegendDirection? direction,
  2. double? itemSpacing,
  3. double? symbolSize,
  4. double? symbolLabelSpacing,
  5. TextStyle? labelStyle,
  6. LegendSymbolShape? symbolShape,
})

Creates a copy with modified values.

Implementation

LegendConfig copyWith({
  LegendDirection? direction,
  double? itemSpacing,
  double? symbolSize,
  double? symbolLabelSpacing,
  TextStyle? labelStyle,
  LegendSymbolShape? symbolShape,
}) {
  return LegendConfig(
    direction: direction ?? this.direction,
    itemSpacing: itemSpacing ?? this.itemSpacing,
    symbolSize: symbolSize ?? this.symbolSize,
    symbolLabelSpacing: symbolLabelSpacing ?? this.symbolLabelSpacing,
    labelStyle: labelStyle ?? this.labelStyle,
    symbolShape: symbolShape ?? this.symbolShape,
  );
}