Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple widgets used the same GlobalKey. #221

Open
daoxingwudao opened this issue Sep 15, 2023 · 1 comment
Open

Multiple widgets used the same GlobalKey. #221

daoxingwudao opened this issue Sep 15, 2023 · 1 comment

Comments

@daoxingwudao
Copy link

======== Exception caught by widgets library =======================================================
The following assertion was thrown while finalizing the widget tree:
Multiple widgets used the same GlobalKey.

The key [LabeledGlobalKey#c5af6] was used by multiple widgets. The parents of those widgets were different widgets that both had the following description:
_EffectiveTickerMode(effective mode: enabled)
A GlobalKey can only be specified on one widget at a time in the widget tree.
When the exception was thrown, this was the stack:
#0 BuildOwner._debugVerifyGlobalKeyReservation... (package:flutter/src/widgets/framework.dart:2883:13)
#1 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:617:13)
#2 BuildOwner._debugVerifyGlobalKeyReservation.. (package:flutter/src/widgets/framework.dart:2827:20)
#3 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:617:13)
#4 BuildOwner._debugVerifyGlobalKeyReservation. (package:flutter/src/widgets/framework.dart:2822:36)
#5 BuildOwner._debugVerifyGlobalKeyReservation (package:flutter/src/widgets/framework.dart:2891:6)
#6 BuildOwner.finalizeTree. (package:flutter/src/widgets/framework.dart:2950:11)
#7 BuildOwner.finalizeTree (package:flutter/src/widgets/framework.dart:3032:8)
#8 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:885:19)
#9 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:378:5)
#10 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1175:15)
#11 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1104:9)
#12 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1015:5)
#13 _invoke (dart:ui/hooks.dart:148:13)
#14 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:318:5)
#15 _drawFrame (dart:ui/hooks.dart:115:31)

@github-actions
Copy link

Thanks for taking the time to open an issue. I will have a look and answer as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant