You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 17, 2025. It is now read-only.
Describe the bug
When I use BubbleShowcase with a RelaitveBubbleSlide with a key that identifies a widget inside a FittedBox, the shape is not displayed in correct size. It looks like the FittedBox's resizing is not taken into consideration.
See that the oval shape displays wrongly sized (and the slide child is wrongly positioned).
Expected behavior
The FittedBox should affect the size of the slide shape.
For myself, I have fixed this by creating a subclass of RelativeBubbleSlide that converts not only the top left corner from local to global coordinates, but the bottom right as well. The code looks like this:
Position getHighlightPosition(BuildContext context, BubbleShowcase bubbleShowcase, int currentSlideIndex) {
RenderBox renderBox = widgetKey.currentContext.findRenderObject() as RenderBox;
Offset offset = renderBox.localToGlobal(Offset.zero);
Offset bottomRight = renderBox.localToGlobal(renderBox.size.bottomRight(Offset.zero)); // convert the bottom right corner from local to global coordinates
return Position(
top: offset.dy,
right: bottomRight.dx, // instead of adding the local size to the global offset use the global coordinates of bottom right corner
bottom: bottomRight.dy, // instead of adding the local size to the global offset use the global coordinates of bottom right corner
left: offset.dx,
);
}
The text was updated successfully, but these errors were encountered:
Describe the bug
When I use BubbleShowcase with a RelaitveBubbleSlide with a key that identifies a widget inside a FittedBox, the shape is not displayed in correct size. It looks like the FittedBox's resizing is not taken into consideration.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The FittedBox should affect the size of the slide shape.
For myself, I have fixed this by creating a subclass of RelativeBubbleSlide that converts not only the top left corner from local to global coordinates, but the bottom right as well. The code looks like this:
The text was updated successfully, but these errors were encountered: