bensonarafat / super_tooltip

SuperTooltip It is super flexible and allows you to display ToolTips in the overlay of the screen.
https://pub.dev/packages/super_tooltip
MIT License
142 stars 95 forks source link

Handling Tooltip Display Issues in Flutter Desktop App #120

Open ananya-pathak-wdc opened 2 months ago

ananya-pathak-wdc commented 2 months ago

Describe the bug

I am working on a desktop application and using the super_tooltip package to create custom tooltips with arrows. The tooltip direction is set to down by default, and I'm handling the display and hide functionality using MouseRegion.

However, when I hover over a widget that is partially hidden below the screen, the app freezes, and I receive the following error logs in the console:

Another exception was thrown: Cannot hit test a render box that has never been laid out. Another exception was thrown: 'package:flutter/src/rendering/mouse_tracker.dart': Failed assertion: line 200 pos 12: '!_debugDuringDeviceUpdate': is not true.

Is there a way to automatically invert the tooltip direction if there isn't enough space to display it? Or can we have a condition to prevent the tooltip from being displayed in such scenarios to avoid the app freeze?

Desktop:

ananya-pathak-wdc commented 2 months ago

@bensonarafat Can you please suggest some fix for this?