SmartTooltip constructor

const SmartTooltip({
  1. Key? key,
  2. required Color borderColor,
  3. required Widget child,
  4. required String message,
  5. double borderWidth = 1.0,
  6. Color backgroundColor = Colors.black,
  7. TextStyle textStyle = const TextStyle(color: Colors.white),
  8. TooltipPosition position = TooltipPosition.top,
})

Creates a new instance of SmartTooltip.

  • child: The widget that triggers the tooltip (required).
  • message: The tooltip message to display (required).
  • borderColor: The color of the tooltip border (required).

Example usage:

SmartTooltip(
  message: "This is a tooltip!",
  borderColor: Colors.blue,
  child: Icon(Icons.info),
);

Implementation

const SmartTooltip({
  super.key,
  required this.borderColor,
  required this.child,
  required this.message,
  this.borderWidth = 1.0,
  this.backgroundColor = Colors.black,
  this.textStyle = const TextStyle(
    color: Colors.white,
  ),
  this.position = TooltipPosition.top,
});