Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions lib/src/showcase/showcase.dart
Original file line number Diff line number Diff line change
Expand Up @@ -538,11 +538,7 @@ class _ShowcaseState extends State<Showcase> {
late final String _scopeName =
widget.scope ?? ShowcaseService.instance.getScope().name;

ShowcaseController get _controller => ShowcaseService.instance.getController(
key: widget.showcaseKey,
id: _uniqueId,
scope: _showCaseWidgetManager.name,
);
late ShowcaseController _controller;

late ShowcaseScope _showCaseWidgetManager;

Expand All @@ -553,7 +549,7 @@ class _ShowcaseState extends State<Showcase> {
super.initState();
_showCaseWidgetManager =
ShowcaseService.instance.getScope(scope: _scopeName);
ShowcaseController.register(
_controller = ShowcaseController.register(
id: _uniqueId,
key: widget.showcaseKey,
getState: () => this,
Expand Down Expand Up @@ -581,7 +577,7 @@ class _ShowcaseState extends State<Showcase> {
id: _uniqueId,
scope: _showCaseWidgetManager.name,
);
ShowcaseController.register(
_controller = ShowcaseController.register(
id: _uniqueId,
key: widget.showcaseKey,
getState: () => this,
Expand Down Expand Up @@ -615,6 +611,7 @@ class _ShowcaseState extends State<Showcase> {
}

void _updateControllerValues() {
if (!ShowcaseService.instance.isRegistered(scope: _scopeName)) return;
final manager = ShowcaseService.instance.getScope(scope: _scopeName);
if (manager == _showCaseWidgetManager) return;
_showCaseWidgetManager = manager;
Expand Down