@@ -9,6 +9,7 @@ import 'package:pull_down_button/pull_down_button.dart'
99 show PullDownMenuEntry, PullDownMenu;
1010
1111import '../models/default_data.dart' ;
12+ import '../utils/hover_float_effect.dart' ;
1213import '../utils/typedef.dart' ;
1314
1415//// Theme values for [ReactionsDialogWidget] .
@@ -40,6 +41,7 @@ class ReactionsDialogWidget extends StatefulWidget {
4041 this .menuItemTapAnimationDuration,
4142 this .reactionTapAnimationDuration,
4243 this .reactionPickerFadeLeftAnimationDuration,
44+ this .activateHoverFloatEffect = true ,
4345 });
4446
4547 /// The message widget to be displayed in the dialog
@@ -95,6 +97,9 @@ class ReactionsDialogWidget extends StatefulWidget {
9597 /// Animation duration to display the reactions row
9698 final Duration ? reactionPickerFadeLeftAnimationDuration;
9799
100+ /// Whether to activate the hover float effect
101+ final bool activateHoverFloatEffect;
102+
98103 @override
99104 State <ReactionsDialogWidget > createState () => _ReactionsDialogWidgetState ();
100105}
@@ -117,15 +122,17 @@ class _ReactionsDialogWidgetState extends State<ReactionsDialogWidget> {
117122 return BackdropFilter (
118123 filter: ImageFilter .blur (sigmaX: 5 , sigmaY: 5 ),
119124 child: Padding (
120- padding: const EdgeInsets .only (right: 20 .0 , left: 20 .0 ),
125+ padding: const EdgeInsets .only (right: 32 .0 , left: 32 .0 ),
121126 child: Column (
122127 mainAxisSize: MainAxisSize .max,
123128 crossAxisAlignment: widget.widgetAlignment,
124129 mainAxisAlignment: MainAxisAlignment .center,
125130 children: [
126131 buildReactionsPicker (context, theme),
127132 const SizedBox (height: 10 ),
128- widget.messageWidget,
133+ widget.activateHoverFloatEffect
134+ ? HoverFloatEffect (child: widget.messageWidget)
135+ : widget.messageWidget,
129136 if (widget.menuItems != null && widget.menuItems! .isNotEmpty) ...[
130137 const SizedBox (height: 10 ),
131138 PullDownMenu (items: widget.menuItems! ),
@@ -264,6 +271,7 @@ void showReactionsDialog(
264271 Duration ? reactionTapAnimationDuration,
265272 Duration ? reactionPickerFadeLeftAnimationDuration,
266273 Widget ? moreReactionsWidget,
274+ bool activateHoverFloatEffect = true ,
267275}) {
268276 final providers = ChatProviders .from (context);
269277
@@ -308,6 +316,7 @@ void showReactionsDialog(
308316 reactionPickerFadeLeftAnimationDuration:
309317 reactionPickerFadeLeftAnimationDuration,
310318 moreReactionsWidget: moreReactionsWidget,
319+ activateHoverFloatEffect: activateHoverFloatEffect,
311320 ),
312321 ),
313322 );
0 commit comments