smart_tooltip 0.0.1
smart_tooltip: ^0.0.1 copied to clipboard
A flexible and customizable tooltip widget for Flutter applications.
Smart Tooltip for Flutter #
A flexible and customizable tooltip widget for Flutter applications. The smart_tooltip package allows you to display tooltips with rich content, custom styling, and dynamic positioning.
Features #
- Customizable Tooltip Appearance: Adjust the color, font, size, and shape of the tooltip.
- Interactive Tooltips: Support for displaying complex content such as widgets, images, and text within tooltips.
- Customizable Trigger Events: Show tooltips on hover, tap, or focus, with easy-to-use event listeners.
- Positioning Flexibility: Display tooltips relative to any widget with automatic placement adjustments.
Getting Started #
To use the smart_tooltip package in your Flutter project:
-
Add the package to your
pubspec.yamlfile:dependencies: smart_tooltip: ^0.0.1 -
Run flutter pub get to install the dependencies.
-
Import the package into your Dart file:
import 'package:smart_tooltip/smart_tooltip.dart'; -
Usage Here’s an example of how to use CustomTooltip:
import 'package:flutter/material.dart'; import 'package:smart_tooltip/smart_tooltip.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( appBar: AppBar(title: Text('Smart Tooltip Example')), body: Center( child: CustomTooltip( message: 'This is a tooltip!', child: ElevatedButton( onPressed: () {}, child: Text('Hover over me'), ), ), ), ), ); } }
5.Custom Tooltip with Widgets:
CustomTooltipWithWidget(
message: 'Here is a custom tooltip!',
child: Icon(Icons.info),
tooltipWidget: Text('This is a custom widget inside the tooltip!'),
)