modal_bottom_sheet icon indicating copy to clipboard operation
modal_bottom_sheet copied to clipboard

There are multiple heroes that share the same tag within a subtree.

Open max-anders opened this issue 1 year ago • 1 comments

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

max-anders avatar Jul 19 '24 20:07 max-anders

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.

max-anders avatar Jul 31 '24 18:07 max-anders