diff --git a/CHANGELOG.md b/CHANGELOG.md
index 69d9f586..45a853a6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,7 @@
- Updated minimum support to dart sdk 2.18.0
- Fixed [#449](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/issues/449) - Null check operator used on a null value
- [BREAKING] Improvement [#400](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/issues/400) - remove Builder widget
+- Fixed [#435](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/issues/435) - Extra padding when add targetShapeBorder
## [2.1.1]
- Fixed [#425](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/issues/425) - Unhandled breaking change in v2.1.0
diff --git a/README.md b/README.md
index 0925c40a..bd2941c2 100644
--- a/README.md
+++ b/README.md
@@ -30,35 +30,6 @@ ShowCaseWidget(
),
```
-## Migration guide for release 2.0.0
-Renamed properties/fields of widgets mentioned below in the table.
-
-| Before | After |
-|-------------------------|--------------------------|
-| autoPlayLockEnable | enableAutoPlayLock |
-| shapeBorder | targetShapeBorder |
-| showcaseBackgroundColor | tooltipBackgroundColor |
-| contentPadding | tooltipPadding |
-| overlayPadding | targetPadding |
-| radius | targetBorderRadius |
-| tipBorderRadius | tooltipBorderRadius |
-| disableAnimation | disableMovingAnimation |
-| animationDuration | movingAnimationDuration |
-
-Removed unused parameter of `Showcase.withWidget()` mentioned below:
-
-- title
-- titleAlignment
-- titleTextStyle
-- description
-- descriptionAlignment
-- descTextStyle
-- textColor
-- tooltipBackgroundColor
-- tooltipBorderRadius
-- tooltipPadding
-
-
## Installing
1. Add dependency to `pubspec.yaml`
diff --git a/lib/src/showcase.dart b/lib/src/showcase.dart
index 33fbe5a6..1779f98b 100644
--- a/lib/src/showcase.dart
+++ b/lib/src/showcase.dart
@@ -596,6 +596,7 @@ class _ShowcaseState extends State {
onLongPress: widget.onTargetLongPress,
shapeBorder: widget.targetShapeBorder,
disableDefaultChildGestures: widget.disableDefaultTargetGestures,
+ targetPadding: widget.targetPadding,
),
ToolTipWidget(
position: position,
@@ -647,11 +648,13 @@ class _TargetWidget extends StatelessWidget {
final ShapeBorder shapeBorder;
final BorderRadius? radius;
final bool disableDefaultChildGestures;
+ final EdgeInsets targetPadding;
const _TargetWidget({
required this.offset,
required this.size,
required this.shapeBorder,
+ required this.targetPadding,
this.onTap,
this.radius,
this.onDoubleTap,
@@ -662,9 +665,8 @@ class _TargetWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Positioned(
- //TODO: Add target padding in major version upgrade
- top: offset.dy,
- left: offset.dx,
+ top: offset.dy - targetPadding.top,
+ left: offset.dx - targetPadding.left,
child: disableDefaultChildGestures
? IgnorePointer(
child: targetWidgetContent(),
@@ -678,11 +680,11 @@ class _TargetWidget extends StatelessWidget {
onTap: onTap,
onLongPress: onLongPress,
onDoubleTap: onDoubleTap,
+ behavior: HitTestBehavior.translucent,
child: Container(
- //TODO: Add target padding in major version upgrade and
- // remove default 16 padding from this widget
- height: size.height + 16,
- width: size.width + 16,
+ height: size.height,
+ width: size.width,
+ margin: targetPadding,
decoration: ShapeDecoration(
shape: radius != null
? RoundedRectangleBorder(borderRadius: radius!)
diff --git a/pubspec.yaml b/pubspec.yaml
index 3cf76642..8cc7ab2a 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,8 +1,8 @@
name: showcaseview
description: A Flutter package to Showcase/Highlight widgets step by step.
version: 3.0.0
-issue_tracker: https://github.com/simformsolutions/flutter_showcaseview/issues
-repository: https://github.com/simformsolutions/flutter_showcaseview
+issue_tracker: https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/issues
+repository: https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview
environment:
sdk: '>=2.18.0 <4.0.0'