@@ -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] .
@@ -35,6 +36,7 @@ class ReactionsDialogWidget extends StatefulWidget {
3536 this .reactionsPickerReactedBackgroundColor,
3637 this .reactionTapAnimationDuration,
3738 this .reactionPickerFadeLeftAnimationDuration,
39+ this .activateHoverFloatEffect = true ,
3840 });
3941
4042 /// The message widget to be displayed in the dialog
@@ -75,6 +77,9 @@ class ReactionsDialogWidget extends StatefulWidget {
7577 /// Animation duration to display the reactions row
7678 final Duration ? reactionPickerFadeLeftAnimationDuration;
7779
80+ /// Whether to activate the hover float effect
81+ final bool activateHoverFloatEffect;
82+
7883 @override
7984 State <ReactionsDialogWidget > createState () => _ReactionsDialogWidgetState ();
8085}
@@ -97,15 +102,17 @@ class _ReactionsDialogWidgetState extends State<ReactionsDialogWidget> {
97102 return BackdropFilter (
98103 filter: ImageFilter .blur (sigmaX: 5 , sigmaY: 5 ),
99104 child: Padding (
100- padding: const EdgeInsets .only (right: 20 .0 , left: 20 .0 ),
105+ padding: const EdgeInsets .only (right: 32 .0 , left: 32 .0 ),
101106 child: Column (
102107 mainAxisSize: MainAxisSize .max,
103108 crossAxisAlignment: widget.widgetAlignment,
104109 mainAxisAlignment: MainAxisAlignment .center,
105110 children: [
106111 buildReactionsPicker (context, theme),
107112 const SizedBox (height: 10 ),
108- widget.messageWidget,
113+ widget.activateHoverFloatEffect
114+ ? HoverFloatEffect (child: widget.messageWidget)
115+ : widget.messageWidget,
109116 if (widget.menuItems != null && widget.menuItems! .isNotEmpty) ...[
110117 const SizedBox (height: 10 ),
111118 PullDownMenu (items: widget.menuItems! ),
@@ -239,6 +246,7 @@ void showReactionsDialog(
239246 Duration ? reactionTapAnimationDuration,
240247 Duration ? reactionPickerFadeLeftAnimationDuration,
241248 Widget ? moreReactionsWidget,
249+ bool activateHoverFloatEffect = true ,
242250}) {
243251 final providers = ChatProviders .from (context);
244252
@@ -278,6 +286,7 @@ void showReactionsDialog(
278286 reactionPickerFadeLeftAnimationDuration:
279287 reactionPickerFadeLeftAnimationDuration,
280288 moreReactionsWidget: moreReactionsWidget,
289+ activateHoverFloatEffect: activateHoverFloatEffect,
281290 ),
282291 ),
283292 );
0 commit comments