let users use custom reaction builders
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user