From c50a46b9a1f375395b5281a7202514a26c22be95 Mon Sep 17 00:00:00 2001 From: Vatsal Tanna Date: Fri, 25 Jun 2021 20:36:22 +0530 Subject: [PATCH] :bug: #56 Landscape mode issue :bug: #86 Showcase isn't rendering responsively --- CHANGELOG.md | 4 +++- lib/src/showcase.dart | 13 ++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index da32917d..de308066 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,9 @@ -## [1.0.1] - March 07, 2021 [Unreleased] +## [1.0.1] - June 25, 2021 [Unreleased] - Fixed [#103](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/issues/103) - add overlay padding. - Fixed [#105](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/issues/105) - showcase not showing text in one line even if it is not so big. +- Fixed [#56](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/issues/56) - Landscape mode issue +- Fixed [#86](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/issues/86) - Showcase isn't rendering responsively ## [1.0.0] - March 07, 2021 diff --git a/lib/src/showcase.dart b/lib/src/showcase.dart index 0a18c86d..987a6b46 100644 --- a/lib/src/showcase.dart +++ b/lib/src/showcase.dart @@ -200,10 +200,17 @@ class _ShowcaseState extends State with TickerProviderStateMixin { @override Widget build(BuildContext context) { - final size = MediaQuery.of(context).size; return AnchoredOverlay( - overlayBuilder: (context, rectBound, offset) => - buildOverlayOnTarget(offset, rectBound.size, rectBound, size), + overlayBuilder: (context, rectBound, offset) { + final size = MediaQuery.of(context).size; + position = GetPosition( + key: widget.key, + padding: widget.overlayPadding, + screenWidth: size.width, + screenHeight: size.height, + ); + return buildOverlayOnTarget(offset, rectBound.size, rectBound, size); + }, showOverlay: true, child: widget.child, );