copyWith method

ZeroTooltipStyle copyWith({
  1. Color? backgroundColor,
  2. Color? lightBackgroundColor,
  3. Color? darkBackgroundColor,
  4. TextStyle? textStyle,
  5. Color? borderColor,
  6. Duration? duration,
})

If the caller passes in a value for a parameter, use that value, otherwise use the value from this object.

A new instance of ZeroTooltipStyle with the same properties as the original instance, except for the properties that are explicitly overridden.

Implementation

ZeroTooltipStyle copyWith({
  Color? backgroundColor,
  Color? lightBackgroundColor,
  Color? darkBackgroundColor,
  TextStyle? textStyle,
  Color? borderColor,
  Duration? duration,
}) {
  return ZeroTooltipStyle(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    lightBackgroundColor: lightBackgroundColor ?? this.lightBackgroundColor,
    darkBackgroundColor: darkBackgroundColor ?? this.darkBackgroundColor,
    textStyle: textStyle ?? this.textStyle,
    borderColor: borderColor ?? this.borderColor,
    duration: duration ?? this.duration,
  );
}