feat(ui): expose attachment actions modal builder
This commit is contained in:
@@ -107,6 +107,7 @@ class StreamMessageWidget extends StatefulWidget {
|
||||
this.imageAttachmentThumbnailSize = const Size(400, 400),
|
||||
this.imageAttachmentThumbnailResizeType = 'clip',
|
||||
this.imageAttachmentThumbnailCropType = 'center',
|
||||
this.attachmentActionsModalBuilder,
|
||||
}) : assert(
|
||||
bottomRowBuilder == null || bottomRowBuilderWithDefaultWidget == null,
|
||||
'You can only use one of the two bottom row builders',
|
||||
@@ -144,6 +145,8 @@ class StreamMessageWidget extends StatefulWidget {
|
||||
imageThumbnailResizeType:
|
||||
imageAttachmentThumbnailResizeType,
|
||||
imageThumbnailCropType: imageAttachmentThumbnailCropType,
|
||||
attachmentActionsModalBuilder:
|
||||
attachmentActionsModalBuilder,
|
||||
),
|
||||
),
|
||||
attachmentShape: border,
|
||||
@@ -171,6 +174,7 @@ class StreamMessageWidget extends StatefulWidget {
|
||||
imageThumbnailSize: imageAttachmentThumbnailSize,
|
||||
imageThumbnailResizeType: imageAttachmentThumbnailResizeType,
|
||||
imageThumbnailCropType: imageAttachmentThumbnailCropType,
|
||||
attachmentActionsModalBuilder: attachmentActionsModalBuilder,
|
||||
),
|
||||
attachmentShape: border,
|
||||
);
|
||||
@@ -204,6 +208,8 @@ class StreamMessageWidget extends StatefulWidget {
|
||||
onAttachmentTap(message, attachment);
|
||||
}
|
||||
: null,
|
||||
attachmentActionsModalBuilder:
|
||||
attachmentActionsModalBuilder,
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
@@ -533,6 +539,9 @@ class StreamMessageWidget extends StatefulWidget {
|
||||
/// {@macro onMessageWidgetAttachmentTap}
|
||||
final OnMessageWidgetAttachmentTap? onAttachmentTap;
|
||||
|
||||
/// {@macro attachmentActionsBuilder}
|
||||
final AttachmentActionsBuilder? attachmentActionsModalBuilder;
|
||||
|
||||
/// Size of the image attachment thumbnail.
|
||||
final Size imageAttachmentThumbnailSize;
|
||||
|
||||
@@ -617,6 +626,7 @@ class StreamMessageWidget extends StatefulWidget {
|
||||
Size? imageAttachmentThumbnailSize,
|
||||
String? imageAttachmentThumbnailResizeType,
|
||||
String? imageAttachmentThumbnailCropType,
|
||||
AttachmentActionsBuilder? attachmentActionsModalBuilder,
|
||||
}) {
|
||||
assert(
|
||||
bottomRowBuilder == null || bottomRowBuilderWithDefaultWidget == null,
|
||||
@@ -703,6 +713,8 @@ class StreamMessageWidget extends StatefulWidget {
|
||||
this.imageAttachmentThumbnailResizeType,
|
||||
imageAttachmentThumbnailCropType: imageAttachmentThumbnailCropType ??
|
||||
this.imageAttachmentThumbnailCropType,
|
||||
attachmentActionsModalBuilder:
|
||||
attachmentActionsModalBuilder ?? this.attachmentActionsModalBuilder,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user