Closed Mounix99 closed 11 months ago
Duplicate of #1804 , the fix is merged and will be shipped with the new patch version, probably today. Sorry for any inconvenience
@esarbanis This is not a duplicate of #1804 . See your custom attachment tutorial:
https://getstream.io/chat/docs/sdk/flutter/customization/custom-widgets/adding_custom_attachments/
To continue to support inline thumbnails for the default attachment types when implementing custom attachment types, it is necessary to handle them in the method passed to StreamMessageInput.mediaAttachmentBuilder.
Before 7.0.0, this could be done by falling back to MessageInputMediaAttachmentThumbnail within the mediaAttachmentBuilder, but that class was removed and its replacement, which appears to be StreamMediaAttachmentThumbnail, was not made accessible.
@esarbanis can you extract this
final colorTheme = StreamChatTheme.of(context).colorTheme;
final shape = RoundedRectangleBorder(
side: BorderSide(
color: colorTheme.borders,
strokeAlign: BorderSide.strokeAlignOutside,
),
borderRadius: BorderRadius.circular(14),
);
return Container(
key: Key(attachment.id),
clipBehavior: Clip.hardEdge,
decoration: ShapeDecoration(shape: shape),
child: AspectRatio(
aspectRatio: 1,
child: Stack(
alignment: Alignment.center,
children: <Widget>[
StreamMediaAttachmentThumbnail(
media: attachment,
width: double.infinity,
height: double.infinity,
fit: BoxFit.cover,
),
if (attachment.type == AttachmentType.video)
Positioned(
left: 8,
bottom: 8,
child: StreamSvgIcon.videoCall(),
),
Positioned(
top: 8,
right: 8,
child: RemoveAttachmentButton(
onPressed: onRemovePressed != null
? () => onRemovePressed!(attachment)
: null,
),
),
],
),
),
);
construction from stream_message_input_attachment_list.dart
to a separate accessible widget ? or at least make StreamMediaAttachmentThumbnail
accessible outside the library ? This is a blocker for my project
Which packages are you using?
stream_chat_flutter
On what platforms did you experience the issue?
iOS, Android, Web
What version are you using?
7.0.0
What happened?
I was using
MessageInputMediaAttachmentThumbnail
forStreamMessageInput.mediaAttachmentBuilder
cause I need some attachment to be custom and other to be provided by package design, in 7.0.0 was removedMessageInputMediaAttachmentThumbnail
and nowStreamMediaAttachmentThumbnail
is user formediaAttachmentBuilder
and it could not be imported, also it's actions not in itself but as a separate widgets over in stack.Steps to reproduce
Supporting info to reproduce
No response
Relevant log output
No response
Flutter analyze output
No response
Flutter doctor output
No response
Code of Conduct