let users use custom reaction builders

This commit is contained in:
Salvatore Giordano
2021-06-14 17:20:52 +02:00
parent aa3cdfcd9e
commit 3a44117628
8 changed files with 148 additions and 26 deletions
@@ -148,6 +148,10 @@ class _MessageActionsModalState extends State<MessageActionsModal> {
final streamChatThemeData = StreamChatTheme.of(context);
final numberOfReactions = streamChatThemeData.reactionIcons.length;
final shiftFactor =
numberOfReactions < 5 ? (5 - numberOfReactions) * 0.1 : 0.0;
final child = Center(
child: SingleChildScrollView(
child: Padding(
@@ -162,8 +166,12 @@ class _MessageActionsModalState extends State<MessageActionsModal> {
Align(
alignment: Alignment(
user?.id == widget.message.user?.id
? (divFactor >= 1.0 ? -0.2 : (1.2 - divFactor))
: (divFactor >= 1.0 ? 0.2 : -(1.2 - divFactor)),
? (divFactor >= 1.0
? -0.2 - shiftFactor
: (1.2 - divFactor))
: (divFactor >= 1.0
? 0.2 + shiftFactor
: -(1.2 - divFactor)),
0),
child: ReactionPicker(
message: widget.message,