Skip to content

Commit 84537f0

Browse files
authored
fix: 🐛 showcase did update widget (#580)
1 parent 309d5ea commit 84537f0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/src/showcase/showcase.dart

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,19 @@ class _ShowcaseState extends State<Showcase> {
563563
super.didUpdateWidget(oldWidget);
564564
if (oldWidget == widget) return;
565565
_updateControllerValues();
566+
if(oldWidget.showcaseKey != widget.showcaseKey) {
567+
ShowcaseService.instance.removeController(
568+
key: oldWidget.showcaseKey,
569+
id: _uniqueId,
570+
scope: _showCaseWidgetManager.name,
571+
);
572+
ShowcaseController.register(
573+
id: _uniqueId,
574+
key: widget.showcaseKey,
575+
getState: () => this,
576+
showcaseView: _showCaseWidgetManager.showcaseView,
577+
);
578+
}
566579
}
567580

568581
@override

0 commit comments

Comments
 (0)