File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed
packages/stream_chat_flutter Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 1+ ## Upcoming Beta
2+
3+ - Fixed regression in ` emoji_code ` support for reactions.
4+
15## 10.0.0-beta.11
26
37- Included the changes from version [ ` 9.22.0 ` ] ( https://pub.dev/packages/stream_chat_flutter/changelog ) .
Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ class StreamReactionPicker extends StatelessWidget {
125125 return ReactionPickerIcon (
126126 type: reactionType,
127127 builder: reactionIcon.builder,
128+ emojiCode: reactionIcon.emojiCode,
128129 // If the reaction is present in ownReactions, it is selected.
129130 isSelected: ownReactionsMap[reactionType] != null ,
130131 );
@@ -136,9 +137,13 @@ class StreamReactionPicker extends StatelessWidget {
136137 reactionIcons: [...indicatorIcons],
137138 onIconPicked: (reactionIcon) {
138139 final reactionType = reactionIcon.type;
139- final reaction = ownReactionsMap[reactionType];
140+ final reactionEmojiCode = reactionIcon.emojiCode;
141+ final pickedReaction = switch (ownReactionsMap[reactionType]) {
142+ final reaction? => reaction,
143+ _ => Reaction (type: reactionType, emojiCode: reactionEmojiCode),
144+ };
140145
141- return onReactionPicked? .call (reaction ?? Reaction (type : reactionType) );
146+ return onReactionPicked? .call (pickedReaction );
142147 },
143148 );
144149
Original file line number Diff line number Diff line change @@ -201,6 +201,7 @@ class ReactionPickerIcon {
201201 /// {@macro reactionPickerIcon}
202202 const ReactionPickerIcon ({
203203 required this .type,
204+ this .emojiCode,
204205 this .isSelected = false ,
205206 this .iconSize = 24 ,
206207 required ReactionIconBuilder builder,
@@ -209,6 +210,11 @@ class ReactionPickerIcon {
209210 /// The unique identifier for the reaction type (e.g., "like", "love").
210211 final String type;
211212
213+ /// Optional emoji code for the reaction.
214+ ///
215+ /// Used to display a custom emoji in the notification.
216+ final String ? emojiCode;
217+
212218 /// A boolean indicating whether this reaction is currently selected by the
213219 /// user.
214220 final bool isSelected;
You can’t perform that action at this time.
0 commit comments