How to create multiple global keys for the flutter-tags?
If i try to create i get:
"
I/flutter (16281): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter (16281): The following assertion was thrown while finalizing the widget tree:
I/flutter (16281): Duplicate GlobalKey detected in widget tree.
I/flutter (16281): The following GlobalKey was specified multiple times in the widget tree. This will lead to parts of
I/flutter (16281): the widget tree being truncated unexpectedly, because the second time a key is seen, the previous
I/flutter (16281): instance is moved to the new location. The key was:
I/flutter (16281): - [LabeledGlobalKey#f8617]
I/flutter (16281): This was determined by noticing that after the widget with the above global key was moved out of its
I/flutter (16281): previous parent, that previous parent never updated during this frame, meaning that it either did
I/flutter (16281): not update at all or updated before the widget was moved, in either case implying that it still
I/flutter (16281): thinks that it should have a child with that global key.
I/flutter (16281): The specific parent that did not update after having one or more children forcibly removed due to
I/flutter (16281): GlobalKey reparenting is:
I/flutter (16281): - Column(direction: vertical, mainAxisAlignment: start, crossAxisAlignment: center, renderObject:
I/flutter (16281): RenderFlex#0d732 relayoutBoundary=up1 NEEDS-PAINT)
I/flutter (16281): A GlobalKey can only be specified on one widget at a time in the widget tree.
"
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following assertion was thrown while finalizing the widget tree:
Multiple widgets used the same GlobalKey.
The key [LabeledGlobalKey#f8617] was used by multiple widgets. The parents of those widgets were:
Column(direction: vertical, mainAxisAlignment: start, crossAxisAlignment: center, renderObject: RenderFlex#0d732 relayoutBoundary=up1 NEEDS-PAINT)
Column(direction: vertical, mainAxisAlignment: start, crossAxisAlignment: center, renderObject: RenderFlex#0cfc5 relayoutBoundary=up1 NEEDS-PAINT)
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:
How to create multiple global keys for the flutter-tags? If i try to create i get: " I/flutter (16281): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════ I/flutter (16281): The following assertion was thrown while finalizing the widget tree: I/flutter (16281): Duplicate GlobalKey detected in widget tree. I/flutter (16281): The following GlobalKey was specified multiple times in the widget tree. This will lead to parts of I/flutter (16281): the widget tree being truncated unexpectedly, because the second time a key is seen, the previous I/flutter (16281): instance is moved to the new location. The key was: I/flutter (16281): - [LabeledGlobalKey#f8617]
I/flutter (16281): This was determined by noticing that after the widget with the above global key was moved out of its
I/flutter (16281): previous parent, that previous parent never updated during this frame, meaning that it either did
I/flutter (16281): not update at all or updated before the widget was moved, in either case implying that it still
I/flutter (16281): thinks that it should have a child with that global key.
I/flutter (16281): The specific parent that did not update after having one or more children forcibly removed due to
I/flutter (16281): GlobalKey reparenting is:
I/flutter (16281): - Column(direction: vertical, mainAxisAlignment: start, crossAxisAlignment: center, renderObject:
I/flutter (16281): RenderFlex#0d732 relayoutBoundary=up1 NEEDS-PAINT)
I/flutter (16281): A GlobalKey can only be specified on one widget at a time in the widget tree.
"
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════ The following assertion was thrown while finalizing the widget tree: Multiple widgets used the same GlobalKey.
The key [LabeledGlobalKey#f8617] was used by multiple widgets. The parents of those widgets were:
0 GlobalKey._debugVerifyGlobalKeyReservation... (package:flutter/src/widgets/framework.dart:246:13)
1 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:379:8)
2 GlobalKey._debugVerifyGlobalKeyReservation.. (package:flutter/src/widgets/framework.dart:193:19)
3 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:379:8)
4 GlobalKey._debugVerifyGlobalKeyReservation. (package:flutter/src/widgets/framework.dart:189:26)