Skip to content

Commit

Permalink
Merge pull request #110 from Sourav-Sonkar/bug/shadows
Browse files Browse the repository at this point in the history
Pass multiple shadow or custom shadow
  • Loading branch information
bensonarafat authored Aug 4, 2024
2 parents 8c1fffe + 6f4492b commit 377b7d9
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions lib/src/super_tooltip.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class SuperTooltip extends StatefulWidget {
final bool showDropBoxFilter;
final double sigmaX;
final double sigmaY;
final List<BoxShadow>? boxShadows;

SuperTooltip({
Key? key,
Expand Down Expand Up @@ -128,6 +129,7 @@ class SuperTooltip extends StatefulWidget {
this.showDropBoxFilter = false,
this.hideTooltipOnBarrierTap = true,
this.toggleOnTap = false,
this.boxShadows,
}) : assert(showDropBoxFilter ? showBarrier ?? false : true,
'showDropBoxFilter or showBarrier can\'t be false | null'),
super(key: key);
Expand Down Expand Up @@ -216,7 +218,7 @@ class _SuperTooltipState extends State<SuperTooltip>
child: GestureDetector(
onTap: () {
if (widget.toggleOnTap && _superTooltipController!.isVisible) {
_superTooltipController!.hideTooltip();
_superTooltipController!.hideTooltip();
} else {
_superTooltipController!.showTooltip();
}
Expand Down Expand Up @@ -402,14 +404,15 @@ class _SuperTooltipState extends State<SuperTooltip>
ShapeDecoration(
color: backgroundColor,
shadows: hasShadow
? <BoxShadow>[
BoxShadow(
blurRadius: shadowBlurRadius,
spreadRadius: shadowSpreadRadius,
color: shadowColor,
offset: shadowOffset,
),
]
? widget.boxShadows ??
<BoxShadow>[
BoxShadow(
blurRadius: shadowBlurRadius,
spreadRadius: shadowSpreadRadius,
color: shadowColor,
offset: shadowOffset,
),
]
: null,
shape: BubbleShape(
arrowBaseWidth: widget.arrowBaseWidth,
Expand Down

0 comments on commit 377b7d9

Please sign in to comment.