feat(ui): expose attachment actions modal builder

This commit is contained in:
Rafał Adasiewicz
2023-02-14 13:51:14 +01:00
parent ade75bd3b7
commit 8a9ecbc024
6 changed files with 36 additions and 0 deletions
@@ -22,6 +22,7 @@ class StreamImageAttachment extends StreamAttachmentWidget {
this.imageThumbnailSize = const Size(400, 400),
this.imageThumbnailResizeType = 'clip',
this.imageThumbnailCropType = 'center',
this.attachmentActionsModalBuilder,
});
/// The [StreamMessageThemeData] to use for the image title
@@ -52,6 +53,9 @@ class StreamImageAttachment extends StreamAttachmentWidget {
/// Defaults to [center]
final String /*center|top|bottom|left|right*/ imageThumbnailCropType;
/// {@macro attachmentActionsBuilder}
final AttachmentActionsBuilder? attachmentActionsModalBuilder;
@override
Widget build(BuildContext context) {
return source.when(
@@ -161,6 +165,8 @@ class StreamImageAttachment extends StreamAttachmentWidget {
userName: message.user!.name,
onShowMessage: onShowMessage,
onReplyMessage: onReplyMessage,
attachmentActionsModalBuilder:
attachmentActionsModalBuilder,
),
);
},