Skip to content

Commit 433095c

Browse files
authored
fix: AnchoredOverlayKey key init (#486)
- Fixed anchoredOverlayKey key init - Improved readability with anchoredOverlayKey init - Made anchoredOverlayKey immutable
1 parent d8d494e commit 433095c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/src/showcase_widget.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ class ShowCaseWidgetState extends State<ShowCaseWidget> {
158158
int? activeWidgetId;
159159
RenderBox? rootRenderObject;
160160
Size? rootWidgetSize;
161-
Key? anchoredOverlayKey;
161+
final Key anchoredOverlayKey = UniqueKey();
162162

163163
late final TooltipActionConfig? globalTooltipActionConfig;
164164

@@ -203,7 +203,6 @@ class ShowCaseWidgetState extends State<ShowCaseWidget> {
203203
rootWidgetSize = rootWidget == null
204204
? MediaQuery.of(context).size
205205
: rootRenderObject?.size;
206-
anchoredOverlayKey = UniqueKey();
207206
});
208207
}
209208

0 commit comments

Comments
 (0)