diff --git a/lib/src/widgets/reaction_button.dart b/lib/src/widgets/reaction_button.dart index b978ad1..d11ee50 100644 --- a/lib/src/widgets/reaction_button.dart +++ b/lib/src/widgets/reaction_button.dart @@ -14,6 +14,7 @@ class ReactionButton extends StatefulWidget { this.boxColor = Colors.white, this.boxElevation = 5, this.boxRadius = 50, + this.boxOffset = Offset.zero, this.isChecked = false, this.itemsSpacing = 8, this.itemScale = .3, @@ -48,6 +49,9 @@ class ReactionButton extends StatefulWidget { /// Reactions box radius [default = 50] final double boxRadius; + /// Reactions box offset [default = Offset.zero] + final Offset boxOffset; + /// Reactions box visibility duration [default = 200 milliseconds] final Duration boxAnimationDuration; @@ -118,7 +122,7 @@ class _ReactionButtonState extends State> { _overlayEntry = OverlayEntry( builder: (context) { return ReactionsBox( - offset: offset ?? _globalKey.offset, + offset: (offset ?? _globalKey.offset) + widget.boxOffset, itemSize: widget.itemSize, reactions: widget.reactions, color: widget.boxColor,