Repository navigation
Custom Overlay for Tooltip Widget #45034
Copy link
Copy link
Closed
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Fluttercustomer: mulligan (g3)frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.p: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagesteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Description
Activity
- addedp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagesc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capability
on Nov 18, 2019 As well as it will be better to add onTap() function along with the onLongPress(), to show the tooltip even on normal click.
@BharathMG, Can you please provide me with the _TooltipOverlay build method. Because I also wanted to achieve the same. It will be helpful for me if you can share the code with me.
Reacted by Klaus Greiner Fiorini- addedframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.
on Jan 16, 2020 - addedteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
on Jul 8, 2023 - addedP3Issues that are less important to the Flutter projectIssues that are less important to the Flutter project
on Dec 11, 2024 - added a commit that references this issue
on Jan 7, 2026 This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.- locked as resolved and limited conversation to collaborators
on Jan 22, 2026
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Fluttercustomer: mulligan (g3)frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.p: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagesteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Internal: b/148141781
Use case
I want to provide a "bubble" in the bottom of Tooltip. And also, "X" icon to close the tooltip. Currently, Tooltip class doesn't provide any property to customize overlay. It is showing a simple Text widget inside a ConstrainedBox. It also lacks a way of showing/hiding tooltip programmatically.
I'm achieving my use case with basically copying the whole Tooltip class and changing the _TooltipOverlay build method.
Tooltip decoration property is only useful to change the shape and background color. There is also no way to show/hide tooltip programmatically.
Proposal
How about providing a overlay parameter in Tooltip?
If it is not provided,
_TooltipOverlaycan be used as a default overlay.I would be happy to give a PR with tests. I don't want to copy the whole Tooltip class from the framework to just modify a single method!
And also, exposing show/hide tooltip would make the widget very much useful!