copyWith method

ScatterTooltipItem copyWith({
  1. String? text,
  2. TextStyle? textStyle,
  3. double? bottomMargin,
  4. TextAlign? textAlign,
  5. TextDirection? textDirection,
  6. List<TextSpan>? children,
})

Copies current ScatterTooltipItem to a new ScatterTooltipItem, and replaces provided values.

Implementation

ScatterTooltipItem copyWith({
  String? text,
  TextStyle? textStyle,
  double? bottomMargin,
  TextAlign? textAlign,
  TextDirection? textDirection,
  List<TextSpan>? children,
}) {
  return ScatterTooltipItem(
    text ?? this.text,
    textStyle: textStyle ?? this.textStyle,
    bottomMargin: bottomMargin ?? this.bottomMargin,
    textAlign: textAlign ?? this.textAlign,
    textDirection: textDirection ?? this.textDirection,
    children: children ?? this.children,
  );
}