There are multiple heroes that share the same tag within a subtree.
Hello I get this error when trying to show the modal bottom sheet from a SlidingUpPanel
There are multiple heroes that share the same tag within a subtree.
It only happens in debugging mode
SlidingUpPanel( controller: controller, renderPanelSheet: false, backdropEnabled: true, color: Colors.transparent, borderRadius: BorderRadius.circular(8), collapsed: MiniPlayer( panelController: controller, ), minHeight: 56, maxHeight: context.height, panel: position > 0 ? FullScreenPlayer( panelController: controller, ) : const SizedBox.shrink(), onPanelSlide: (pos) { positionState.value = pos; if (pos > 0) { FocusScope.of(context).unfocus(); } }, ),
Inside the SlidingUpPanel
IconButton( onPressed: () { showBarModalBottomSheet( isDismissible: true, expand: false, context: context, backgroundColor: Colors.transparent, builder: (context) => PlayerTileMenu( panelController: widget.panelController, track: track!, ), ); }, icon: const Icon(Icons.more_vert)),
how can i fix it ? I tried passing the parent context but that didn't work too
I discovered that my modal sheet was overlaying a floating action button nested in one of the widgets and adding a UniqueKey() to the hero tag solved the problem, I don't know if this is the intended behavior.