-
Notifications
You must be signed in to change notification settings - Fork 846
Open
Description
Firstly, thank you for building this amazing package. It really is excellent.
In my app, I need to be able to update the source property of an ImageMessage, however, when using ChatOperation.update to update the source, the UI doesn't update until some other event causes a rebuild.
You can test this easily by adding a ComposerActionButton to the "local" example. Sending an image message, and then tap the ComposerActionButton
ComposerActionButton(
icon: Icons.delete_sweep,
title: 'Update message at index 0',
onPressed: () {
final message = _chatController.messages[0];
final newMessage = ImageMessage(
id: message.id,
authorId: message.authorId,
createdAt: message.createdAt ?? DateTime.now().toUtc(),
sentAt: message.sentAt ?? DateTime.now().toUtc(),
source: '** SOME NEW IMAGE URL **',
);
_chatController.updateMessage(message, newMessage);
},
destructive: true,
),
I've also noticed that when the UI does rebuild, the dimensions of the new image source are not respected. For example, if the original image was portrait and the updated image is square, after rebuild the image will remain portrait.
Simulator.Screen.Recording.-.iPhone.16.-.2026-02-23.at.19.39.16.480p.mov
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels