From ad36eefc7ed3174bf7313504c0c88c2f74c7c47d Mon Sep 17 00:00:00 2001 From: Aditya Chavda Date: Wed, 23 Jul 2025 12:10:56 +0530 Subject: [PATCH] chore!: :fire: Remove height and width requirement in `Showcase.withWidget` --- CHANGELOG.md | 4 ++++ example/lib/main.dart | 2 -- lib/src/showcase/showcase.dart | 14 +------------- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44e9eacb..3d5f4352 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,10 @@ Update deprecated `ShowCaseWidget` removal version. - Improvement [#505](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/pull/505) - Fixed example app to run in flutter version `v3.32.5`. +- Breaking [#541](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/pull/541) - + Removed height and width from `Showcase.withWidget` constructor, as it is not required anymore. +- Improvement [#555](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/issues/555) + Expose `onFinish` callback via ShowCaseView.get. - Fixed [#564](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/issues/564) - Apply textScaler to tooltip widgets. diff --git a/example/lib/main.dart b/example/lib/main.dart index 0df39d41..982de8dd 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -599,8 +599,6 @@ class MailTile extends StatelessWidget { if (showCaseDetail) Showcase.withWidget( key: showCaseKey!, - height: 50, - width: 150, tooltipActionConfig: const TooltipActionConfig( alignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.center, diff --git a/lib/src/showcase/showcase.dart b/lib/src/showcase/showcase.dart index 273dbc66..738bd477 100644 --- a/lib/src/showcase/showcase.dart +++ b/lib/src/showcase/showcase.dart @@ -112,9 +112,7 @@ class Showcase extends StatefulWidget { this.enableAutoScroll, this.floatingActionWidget, this.targetTooltipGap = 10, - }) : height = null, - width = null, - container = null, + }) : container = null, showcaseKey = key, assert( targetTooltipGap >= 0, @@ -152,8 +150,6 @@ class Showcase extends StatefulWidget { /// ```dart /// Showcase.withWidget( /// key: _customKey, - /// height: 80, - /// width: 140, /// container: Column( /// children: [ /// Text( @@ -172,8 +168,6 @@ class Showcase extends StatefulWidget { /// ``` const Showcase.withWidget({ required GlobalKey key, - required this.height, - required this.width, required this.container, required this.child, this.floatingActionWidget, @@ -336,12 +330,6 @@ class Showcase extends StatefulWidget { /// Default to `true` final bool showArrow; - /// Height of [container] - final double? height; - - /// Width of [container] - final double? width; - /// The duration of time the bouncing animation of tooltip should last. /// /// Default to [Duration(milliseconds: 2000)]