Implement thumbnails for image and video in Flutter SDK

I want to show thumbnails of images sent from chat over SendBird Flutter native app code.
Here is the sample code , But we are able to find any option to implement this.

final preMessage =
channel.sendFileMessage(params, onCompleted: (msg, error) {
final index =
_messages.indexWhere((element) => element.requestId == msg.requestId);
if (index != -1) _messages.removeAt(index);
_messages = [msg, …_messages];
_messages.sort((a, b) => b.createdAt.compareTo(a.createdAt));
markAsReadDebounce();
log(‘Disposed Value== >> $isDisposed’);
if (!isDisposed) notifyListeners();
});
sendFileMessage has no any parameter for thumbnails.

Hey @Ashutosh_Kumar,

Welcome to the Sendbird Community.

Are you looking to pass in already generated thumbnail files, sizes or urls? I do see that it does not appear to be included in the fileMessageParams but just want to understand what you’re looking to pass to us.

Now i am able to set thumbnails size in onSendFileMessage() and getting the thumbnails in loadMessages() using this code :_messages[0].toJson()[‘thumbnails’]

and getting : [{url: https://file-ap-8.sendbird.com/0bf57ccd3e6d4e7daf3c232be67e5881.jpe, plain_url: null, height: 400.0, width: 400.0, real_height: 225.0, real_width: 400.0}]

Now , I have to implement onTap() on image and view in full screen.Pls help me out.

Hi @Ashutosh_Kumar,

onTap() would be a UI specific inquiry and falls outside the scope of Sendbird. You would need to implement this on your own.

@Tyler i am not getting thumbnail in reply messages. check below screenshot for reference.

Did you found any solution? i am getting same issue

1 Like

@Tyler kindly advice