mtooltip 1.0.3-beta copy "mtooltip: ^1.0.3-beta" to clipboard
mtooltip: ^1.0.3-beta copied to clipboard

A customizable tooltip implementation for Flutter applications that provides enhanced control over tooltip appearance and behavior.

mtooltip #

A lightweight, highly-customizable tooltip widget for Flutter with support for top/bottom positioning, controllers, and rich content.

Quick links

Features #

  • Custom shape with arrow indicator (top / bottom)
  • Attach a controller to programmatically show / remove tooltips
  • Accepts any widget as tooltip content (cards, texts, images, etc.)
  • Fade-in/out animation and configurable timings
  • Example app included: example/lib/main.dart

Installation Add this package to your project's pubspec.yaml:

dependencies:
  mtooltip:  

Requirements #

  • Dart SDK: ^3.9.2 (see package pubspec) — pubspec.yaml
  • Flutter: >=1.17.0

Basic usage #

final controller = MTooltipController();

MTooltip(
  context: context,
  child: Icon(Icons.info),
  tooltipContent: const Text('Simple tooltip content'),
  backgroundColor: Colors.blue,
  mTooltipController: controller,
);

Programmatic control #

Use the controller to show or remove the tooltip:

controller.show();
controller.remove();

Controller API: MTooltipController.show and MTooltipController.remove.

Advanced usage (custom card) #

final controller = MTooltipController();

MTooltip(
  context: context,
  mTooltipController: controller,
  tooltipAlign: TooltipAlign.top,
  backgroundColor: Colors.black87,
  tooltipContent: Container(
    child: Column(
        children: [
            Text("This is a Tooltip"),
            IconButton(
                onPressed: () {
                    mc1.remove();
                    mc2.show();
            },
            icon: Icon(Icons.navigate_next),
        ),
    ]),
  ),
  child: const Text('Tap to show tooltip'),
);

See MTooltipCard for the card structure.

API notes #

Example and testing #

flutter test

Tests live at test/mtooltip_test.dart.

Contributing #

Contributions are welcome. Please follow standard fork/branch/PR workflow and update or add tests where appropriate.

License #

This project is MIT-licensed — see LICENSE.

2
likes
140
points
7
downloads

Publisher

verified publishermdhashim.com

Weekly Downloads

A customizable tooltip implementation for Flutter applications that provides enhanced control over tooltip appearance and behavior.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on mtooltip