|
1 | 1 | ## Upcoming Beta |
2 | 2 |
|
| 3 | +✅ Added |
| 4 | + |
| 5 | +- Added `reactionIndicatorBuilder` parameter to `StreamMessageWidget` for customizing reaction |
| 6 | + indicators. Users can now display reaction counts alongside emojis on mobile, matching desktop/web |
| 7 | + behavior. Fixes [#2434](https://github.com/GetStream/stream-chat-flutter/issues/2434). |
| 8 | + ```dart |
| 9 | + // Example: Show reaction count next to emoji |
| 10 | + StreamMessageWidget( |
| 11 | + message: message, |
| 12 | + reactionIndicatorBuilder: (context, message, onTap) { |
| 13 | + return StreamReactionIndicator( |
| 14 | + message: message, |
| 15 | + onTap: onTap, |
| 16 | + reactionIcons: StreamChatConfiguration.of(context).reactionIcons, |
| 17 | + reactionIconBuilder: (context, icon) { |
| 18 | + final count = message.reactionGroups?[icon.type]?.count ?? 0; |
| 19 | + return Row( |
| 20 | + children: [ |
| 21 | + icon.build(context), |
| 22 | + const SizedBox(width: 4), |
| 23 | + Text('$count'), |
| 24 | + ], |
| 25 | + ); |
| 26 | + }, |
| 27 | + ); |
| 28 | + }, |
| 29 | + ) |
| 30 | + ``` |
| 31 | + |
| 32 | +- Added `reactionIconBuilder` and `backgroundColor` parameters to `StreamReactionPicker`. |
| 33 | +- Exported `StreamReactionIndicator` and related components (`ReactionIndicatorBuilder`, |
| 34 | + `ReactionIndicatorIconBuilder`, `ReactionIndicatorIcon`, `ReactionIndicatorIconList`). |
| 35 | + |
3 | 36 | 🛑️ Breaking |
4 | 37 |
|
5 | | -- `onAttachmentTap` callback signature has changed to support custom attachment handling with automatic fallback to default behavior. The callback now receives `BuildContext` as the first parameter and returns `FutureOr<bool>` to indicate if the attachment was handled. |
| 38 | +- `onAttachmentTap` callback signature changed to include `BuildContext` as first parameter and |
| 39 | + returns `FutureOr<bool>` to indicate if handled. |
6 | 40 | ```dart |
7 | 41 | // Before |
8 | 42 | StreamMessageWidget( |
|
29 | 63 | ) |
30 | 64 | ``` |
31 | 65 |
|
| 66 | +- `ReactionPickerIconList` constructor changed: removed `message` parameter, changed `reactionIcons` |
| 67 | + type to `List<ReactionPickerIcon>`, renamed `onReactionPicked` to `onIconPicked`. |
| 68 | + |
32 | 69 | For more details, please refer to the [migration guide](../../migrations/v10-migration.md). |
33 | 70 |
|
34 | 71 | ## 10.0.0-beta.8 |
|
0 commit comments