copyWith method
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,
);
}