diff --git a/CHANGELOG.md b/CHANGELOG.md index 8abae46a..c64633d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,8 @@ - Fixed [#173](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/issues/173) - showArrow not working - Fixed [#150](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/issues/150) - Add condition for determine state is active -- Fixed [#121](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/issues/121) - SlideTransition widget in tooltip_widget.dart is constantly rebuilding even after the showcasing is supposed to have stopped +- Fixed [#121](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/issues/121) - SlideTransition widget in tooltip_widget.dart is constantly rebuildung even after the showcasing is supposed to have stopped +- Fixed [#152](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/issues/152) - Calculation of tooltip position - Fixed [#182](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/issues/182) - Not providing blurValue causes Exception: Please provide ShowCaseView context ## [1.1.4] - November 26, 2021 diff --git a/lib/src/tooltip_widget.dart b/lib/src/tooltip_widget.dart index e8ceeafe..ded3e400 100644 --- a/lib/src/tooltip_widget.dart +++ b/lib/src/tooltip_widget.dart @@ -82,7 +82,13 @@ class _ToolTipWidgetState extends State bool isCloseToTopOrBottom(Offset position) { var height = 120.0; height = widget.contentHeight ?? height; - return (widget.screenSize!.height - position.dy) <= height; + final bottomPosition = + position.dy + ((widget.position?.getHeight() ?? 0) / 2); + final topPosition = position.dy - ((widget.position?.getHeight() ?? 0) / 2); + return ((widget.screenSize?.height ?? MediaQuery.of(context).size.height) - + bottomPosition) <= + height && + topPosition >= height; } String findPositionForContent(Offset position) {