TooltipBehavior constructor

TooltipBehavior({
  1. TextStyle? textStyle,
  2. ActivationMode? activationMode,
  3. int? animationDuration,
  4. bool? enable,
  5. double? opacity,
  6. Color? borderColor,
  7. double? borderWidth,
  8. double? duration,
  9. bool? shouldAlwaysShow,
  10. double? elevation,
  11. bool? canShowMarker,
  12. ChartAlignment? textAlignment,
  13. int? decimalPlaces,
  14. TooltipPosition? tooltipPosition,
  15. bool? shared,
  16. Color? color,
  17. String? header,
  18. String? format,
  19. ChartWidgetBuilder? builder,
  20. Color? shadowColor,
})

Creating an argument constructor of TooltipBehavior class.

Implementation

TooltipBehavior(
    {TextStyle? textStyle,
    ActivationMode? activationMode,
    int? animationDuration,
    bool? enable,
    double? opacity,
    Color? borderColor,
    double? borderWidth,
    double? duration,
    bool? shouldAlwaysShow,
    double? elevation,
    bool? canShowMarker,
    ChartAlignment? textAlignment,
    int? decimalPlaces,
    TooltipPosition? tooltipPosition,
    bool? shared,
    this.color,
    this.header,
    this.format,
    this.builder,
    this.shadowColor})
    : animationDuration = animationDuration ?? 350,
      textAlignment = textAlignment ?? ChartAlignment.center,
      textStyle = textStyle ?? const TextStyle(fontSize: 12),
      activationMode = activationMode ?? ActivationMode.singleTap,
      borderColor = borderColor ?? Colors.transparent,
      borderWidth = borderWidth ?? 0,
      duration = duration ?? 3000,
      enable = enable ?? false,
      opacity = opacity ?? 1,
      shouldAlwaysShow = shouldAlwaysShow ?? false,
      canShowMarker = canShowMarker ?? true,
      tooltipPosition = tooltipPosition ?? TooltipPosition.auto,
      elevation = elevation ?? 2.5,
      decimalPlaces = decimalPlaces ?? 3,
      shared = shared ?? false;