From ee4345587227eb6ebae1d2d9f23a13f3585b945c Mon Sep 17 00:00:00 2001 From: Benson Arafat Date: Thu, 28 Sep 2023 20:11:45 +0100 Subject: [PATCH 1/2] fix: custom decoration --- lib/src/super_tooltip.dart | 53 +++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/lib/src/super_tooltip.dart b/lib/src/super_tooltip.dart index 5b91d4e..69d3017 100644 --- a/lib/src/super_tooltip.dart +++ b/lib/src/super_tooltip.dart @@ -371,32 +371,33 @@ class _SuperTooltipState extends State closeButtonSize: closeButtonSize, showCloseButton: showCloseButton, ), - decoration: ShapeDecoration( - color: backgroundColor, - shadows: hasShadow - ? [ - BoxShadow( - blurRadius: shadowBlurRadius, - spreadRadius: shadowSpreadRadius, - color: shadowColor, - ), - ] - : null, - shape: BubbleShape( - arrowBaseWidth: widget.arrowBaseWidth, - arrowTipDistance: widget.arrowTipDistance, - borderColor: widget.borderColor, - borderRadius: widget.borderRadius, - borderWidth: widget.borderWidth, - bottom: bottom, - left: left, - preferredDirection: preferredDirection, - right: right, - target: target, - top: top, - bubbleDimensions: widget.bubbleDimensions, - ), - ), + decoration: widget.decoration ?? + ShapeDecoration( + color: backgroundColor, + shadows: hasShadow + ? [ + BoxShadow( + blurRadius: shadowBlurRadius, + spreadRadius: shadowSpreadRadius, + color: shadowColor, + ), + ] + : null, + shape: BubbleShape( + arrowBaseWidth: widget.arrowBaseWidth, + arrowTipDistance: widget.arrowTipDistance, + borderColor: widget.borderColor, + borderRadius: widget.borderRadius, + borderWidth: widget.borderWidth, + bottom: bottom, + left: left, + preferredDirection: preferredDirection, + right: right, + target: target, + top: top, + bubbleDimensions: widget.bubbleDimensions, + ), + ), child: widget.content, ), ), From 5092f8e50d479ca083a51a6a74ac7e65fb2bda85 Mon Sep 17 00:00:00 2001 From: Benson Arafat Date: Thu, 28 Sep 2023 20:14:10 +0100 Subject: [PATCH 2/2] Update Changelog --- CHANGELOG.md | 3 +++ pubspec.yaml | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1c8ede..8f47ad0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ + +# [2.0.7] - 28.09.2023 +* Fix custom decoration # [2.0.6] - 28.09.2023 * Fix custom decoration and hide tooltip on tab diff --git a/pubspec.yaml b/pubspec.yaml index 453c5b8..65c89b6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: super_tooltip description: Super flexible Tooltip class that gets opend in the screens overlay -version: 2.0.6 -homepage: https://github.com/escamoteur/super_tooltip +version: 2.0.7 +homepage: https://github.com/bensonarafat/super_tooltip environment: