Skip to content

Commit

Permalink
Merge pull request #90 from CuongNV12/feature/offset
Browse files Browse the repository at this point in the history
expose shadowOffset
  • Loading branch information
bensonarafat authored Feb 2, 2024
2 parents 113253c + 0a32390 commit 5431566
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/src/super_tooltip.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class SuperTooltip extends StatefulWidget {
final Color? shadowColor;
final double? shadowBlurRadius;
final double? shadowSpreadRadius;
final Offset? shadowOffset;
final double? top, right, bottom, left;
final ShowCloseButton? showCloseButton;
final Color? closeButtonColor;
Expand Down Expand Up @@ -74,6 +75,7 @@ class SuperTooltip extends StatefulWidget {
this.shadowColor,
this.shadowBlurRadius,
this.shadowSpreadRadius,
this.shadowOffset,
this.top,
this.right,
this.bottom,
Expand Down Expand Up @@ -146,6 +148,7 @@ class _SuperTooltipState extends State<SuperTooltip>
late Color shadowColor;
late double shadowBlurRadius;
late double shadowSpreadRadius;
late Offset shadowOffset;
late bool showBlur;

@override
Expand Down Expand Up @@ -192,6 +195,7 @@ class _SuperTooltipState extends State<SuperTooltip>
shadowColor = widget.shadowColor ?? Colors.black54;
shadowBlurRadius = widget.shadowBlurRadius ?? 10.0;
shadowSpreadRadius = widget.shadowSpreadRadius ?? 5.0;
shadowOffset = widget.shadowOffset ?? Offset.zero;
showBlur = widget.showDropBoxFilter;

return CompositedTransformTarget(
Expand Down Expand Up @@ -380,6 +384,7 @@ class _SuperTooltipState extends State<SuperTooltip>
blurRadius: shadowBlurRadius,
spreadRadius: shadowSpreadRadius,
color: shadowColor,
offset: shadowOffset,
),
]
: null,
Expand Down

0 comments on commit 5431566

Please sign in to comment.