Skip to content

Commit ad39809

Browse files
authored
Merge pull request GetStream#71 from ayush221b/migrate/deprecated_code_full_screen
fix(sample_app): Migrated the deprecated widgets to v4 widgets
2 parents 9282210 + 8706956 commit ad39809

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

packages/stream_chat_v1/lib/channel_media_display_screen.dart

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,15 @@ class _ChannelMediaDisplayScreenState extends State<ChannelMediaDisplayScreen> {
181181
builder: (context) => StreamChannel(
182182
channel: channel,
183183
child: StreamFullScreenMedia(
184-
mediaAttachments:
185-
media.map((e) => e.attachment).toList(),
184+
mediaAttachmentPackages: media
185+
.map(
186+
(e) => StreamAttachmentPackage(
187+
attachment: e.attachment,
188+
message: e.message,
189+
),
190+
)
191+
.toList(),
186192
startIndex: position,
187-
message: media[position].message,
188193
userName: media[position].message.user!.name,
189194
onShowMessage: widget.onShowMessage,
190195
),

0 commit comments

Comments
 (0)