getHighlightPosition method
Position
getHighlightPosition(
- BuildContext context,
- BubbleShowcase bubbleShowcase,
- int currentSlideIndex
override
Returns the position to highlight.
Implementation
@override
Position getHighlightPosition(
BuildContext context,
BubbleShowcase bubbleShowcase,
int currentSlideIndex,
) {
RenderBox renderBox =
widgetKey.currentContext!.findRenderObject() as RenderBox;
Offset offset = renderBox.localToGlobal(Offset.zero);
return Position(
top: offset.dy - highlightPadding,
right: offset.dx + renderBox.size.width + highlightPadding,
bottom: offset.dy + renderBox.size.height + highlightPadding,
left: offset.dx - highlightPadding,
);
}