@@ -215,7 +215,6 @@ class _ToolTipWrapperState extends State<ToolTipWrapper>
215215 ),
216216 ),
217217 );
218-
219218 return Material (
220219 type: MaterialType .transparency,
221220 child: _AnimatedTooltipMultiLayout (
@@ -243,15 +242,22 @@ class _ToolTipWrapperState extends State<ToolTipWrapper>
243242 Offset .zero,
244243 targetTooltipGap: widget.targetTooltipGap,
245244 children: [
245+ // We have to use UniqueKey here to avoid the issue with the
246+ // _TooltipLayoutId being reused and causing layout issues
247+ // See: documentation of [MultiChildRenderObjectWidget] for more
248+ // details and to reproduce issue navigate to details screen in
249+ // example app with route transition
246250 _TooltipLayoutId (
247251 id: TooltipLayoutSlot .tooltipBox,
252+ key: UniqueKey (),
248253 child: defaultToolTipWidget,
249254 ),
250255 if (widget.tooltipActions.isNotEmpty &&
251256 (widget.tooltipActionConfig.position.isOutside ||
252257 widget.container != null ))
253258 _TooltipLayoutId (
254259 id: TooltipLayoutSlot .actionBox,
260+ key: UniqueKey (),
255261 child: ActionWidget (
256262 tooltipActionConfig: widget.tooltipActionConfig,
257263 children: widget.tooltipActions,
@@ -260,6 +266,7 @@ class _ToolTipWrapperState extends State<ToolTipWrapper>
260266 if (widget.showArrow)
261267 _TooltipLayoutId (
262268 id: TooltipLayoutSlot .arrow,
269+ key: UniqueKey (),
263270 child: ShowcaseArrow (
264271 strokeColor: widget.tooltipBackgroundColor,
265272 ),
0 commit comments