Implemented StreamAttachmentPackage and fixed operations in widgets linked to full screen implementation, also fixed tests
This commit is contained in:
@@ -28,7 +28,7 @@ class StreamGalleryHeader extends StatelessWidget
|
||||
const StreamGalleryHeader({
|
||||
Key? key,
|
||||
required this.message,
|
||||
this.currentIndex = 0,
|
||||
required this.attachment,
|
||||
this.showBackButton = true,
|
||||
this.onBackPressed,
|
||||
this.onShowMessage,
|
||||
@@ -60,15 +60,15 @@ class StreamGalleryHeader extends StatelessWidget
|
||||
/// Message which attachments are attached to
|
||||
final Message message;
|
||||
|
||||
/// The attachment that's currently in focus
|
||||
final Attachment attachment;
|
||||
|
||||
/// Username of sender
|
||||
final String userName;
|
||||
|
||||
/// Text which connotes the time the message was sent
|
||||
final String sentAt;
|
||||
|
||||
/// Stores the current index of media shown
|
||||
final int currentIndex;
|
||||
|
||||
/// The background color of this [StreamGalleryHeader].
|
||||
final Color? backgroundColor;
|
||||
|
||||
@@ -146,14 +146,14 @@ class StreamGalleryHeader extends StatelessWidget
|
||||
StreamChatTheme.of(context).galleryHeaderTheme;
|
||||
|
||||
final defaultModal = AttachmentActionsModal(
|
||||
attachment: attachment,
|
||||
message: message,
|
||||
currentIndex: currentIndex,
|
||||
onShowMessage: onShowMessage,
|
||||
);
|
||||
|
||||
final effectiveModal = attachmentActionsModalBuilder?.call(
|
||||
context,
|
||||
message.attachments[currentIndex],
|
||||
attachment,
|
||||
defaultModal,
|
||||
) ??
|
||||
defaultModal;
|
||||
|
||||
Reference in New Issue
Block a user