Skip to content

Commit

Permalink
🐛 #105 showcase not showing text in one line even if it is not so big.
Browse files Browse the repository at this point in the history
  • Loading branch information
vatsaltanna-simformsolutions committed Jun 3, 2021
1 parent 166a8cb commit 4fcb2e0
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 29 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## [1.0.1] - March 07, 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.

## [1.0.0] - March 07, 2021

- Fixed [#95](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/issues/95) - Migrated to null safety.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/showcase.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class Showcase extends StatefulWidget {
this.disposeOnTap,
this.animationDuration = const Duration(milliseconds: 2000),
this.disableAnimation = false,
this.contentPadding = const EdgeInsets.symmetric(vertical: 8),
this.contentPadding = const EdgeInsets.symmetric(vertical: 8, horizontal: 8),
this.onToolTipClick,
this.overlayPadding = EdgeInsets.zero})
: height = null,
Expand Down
49 changes: 21 additions & 28 deletions lib/src/tooltip_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -206,42 +206,35 @@ class _ToolTipWidgetState extends State<ToolTipWidget> {
child: GestureDetector(
onTap: widget.onTooltipTap,
child: Container(
width: _getTooltipWidth(),
constraints: BoxConstraints(
maxWidth: widget.screenSize!.width - 20),
padding: widget.contentPadding,
color: widget.tooltipColor,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
crossAxisAlignment: widget.title != null
? CrossAxisAlignment.start
: CrossAxisAlignment.center,
children: <Widget>[
Container(
child: Column(
crossAxisAlignment: widget.title != null
? CrossAxisAlignment.start
: CrossAxisAlignment.center,
children: <Widget>[
widget.title != null
? Text(
widget.title!,
style: widget.titleTextStyle ??
Theme.of(context)
.textTheme
.headline6!
.merge(TextStyle(
color:
widget.textColor)),
)
: Container(),
Text(
widget.description!,
style: widget.descTextStyle ??
widget.title != null
? Text(
widget.title!,
style: widget.titleTextStyle ??
Theme.of(context)
.textTheme
.subtitle2!
.headline6!
.merge(TextStyle(
color: widget.textColor)),
),
],
),
)
)
: SizedBox.shrink(),
Text(
widget.description!,
style: widget.descTextStyle ??
Theme.of(context)
.textTheme
.subtitle2!
.merge(TextStyle(
color: widget.textColor)),
),
],
),
),
Expand Down

0 comments on commit 4fcb2e0

Please sign in to comment.