fix: Tooltip now correctly uses constructor-given style#1321
fix: Tooltip now correctly uses constructor-given style#1321jacksonb-cs wants to merge 2 commits intobdlukaa:masterfrom
Tooltip now correctly uses constructor-given style#1321Conversation
There was a problem hiding this comment.
Code Review
This pull request ensures that the Tooltip component correctly applies the style provided in its constructor by caching a merged theme and updating it within didUpdateWidget. It also includes a new test case to verify that the waitDuration property is respected. The review feedback suggests a logic improvement to restart the display timer if the waitDuration is modified while a tooltip is pending to ensure a consistent user experience.
| if (oldWidget.style != widget.style) { | ||
| _cacheTooltipTheme(context); | ||
| } |
There was a problem hiding this comment.
While updating the cached theme when the widget style changes is correct, if a tooltip is currently waiting to be shown (i.e., _showTimer is active), it will still use the old waitDuration. For a more consistent experience, consider canceling and restarting the timer if the waitDuration changes during didUpdateWidget.
Bug Fix: TooltipThemeData.waitDuration and others not affected by given widget style
Fixes #1320
Pre-launch Checklist
CHANGELOG.mdwith my changes