You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using super_tootip all over my code base to implement a guided first-time-user tour of the app. I have tooltips running on my main screen, left and right drawers, various dialogs, etc.
My basic pattern is a condition to see if the tooltip should be active and, if so, I call a method that creates it with an associated controller. Just before returning it to the. build () function I call it from I also kick off a postframe callback (WidgetsBinding.instance.addPostFrameCallback((_) specifically) that invokes toolTipController!.showTooltip() using the controller associated with the tooltip that is returned to the build() call.
This pattern has worked flawlessly until I tried to use this pattern from within showModalBottomSheet (which looks a LOT like what I do successfully within showDialog where it works fine). Everything works fine in showModalBottomSheet until the postframecallback calls toolTipController.showTooltip(). If I do not make that call things run fine and I can even successfully show the tooltip if I call toolTipController.sthoTooltip() from an onPressed: callback from a button inside the modal bottom sheet. But, when I let the postframecallback call the same the flutter runtime asserts telling me that something has a negative min height (both max and min height are negative and share the same value - maybe a box constraints calculation isn't working right?).
Is this a known issue? Is there a workaround?
(see below for update)
The text was updated successfully, but these errors were encountered:
Specifying the popupDirection as any of TooltipDirection.left, TooltipDirection.right, TooltipDirection.up all work fine. The exception only occurs when I use TooltipDirection.down.
righteoustales
changed the title
is super_tooltip compatible with showModalBottomSheet?
exception when used with showModalBottomSheet and tooltipDirection.down
Apr 18, 2024
Update: I saw a couple of other odd anomalies since I first created this bug. One of the other ones I saw was that the tooltip would not show when it should after I switched tabs in a TabBar. After seeing that one, I began to wonder if the underlying issue has to do with animations (since both bottom sheets and tab bars are animated). Sure enough, when I create an animation controller and set the duration to 0 milliseconds all of the anomalies seem to go away.
That said, I have not seen these issues occur while using left/right drawers so far which are also animated.
Hopefully this helps with the debugging of the issue and also as a workaround for others who show up here due to encountering the same issues.
I'm using super_tootip all over my code base to implement a guided first-time-user tour of the app. I have tooltips running on my main screen, left and right drawers, various dialogs, etc.
My basic pattern is a condition to see if the tooltip should be active and, if so, I call a method that creates it with an associated controller. Just before returning it to the. build () function I call it from I also kick off a postframe callback (WidgetsBinding.instance.addPostFrameCallback((_) specifically) that invokes toolTipController!.showTooltip() using the controller associated with the tooltip that is returned to the build() call.
This pattern has worked flawlessly until I tried to use this pattern from within showModalBottomSheet (which looks a LOT like what I do successfully within showDialog where it works fine). Everything works fine in showModalBottomSheet until the postframecallback calls toolTipController.showTooltip(). If I do not make that call things run fine and I can even successfully show the tooltip if I call toolTipController.sthoTooltip() from an onPressed: callback from a button inside the modal bottom sheet. But, when I let the postframecallback call the same the flutter runtime asserts telling me that something has a negative min height (both max and min height are negative and share the same value - maybe a box constraints calculation isn't working right?).
Is this a known issue? Is there a workaround?
(see below for update)
The text was updated successfully, but these errors were encountered: