fix: fixed channel media issue
This commit is contained in:
@@ -167,6 +167,7 @@ class _ChannelMediaDisplayScreenState extends State<ChannelMediaDisplayScreen> {
|
|||||||
SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3),
|
SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3),
|
||||||
itemBuilder: (context, position) {
|
itemBuilder: (context, position) {
|
||||||
var channel = StreamChannel.of(context).channel;
|
var channel = StreamChannel.of(context).channel;
|
||||||
|
print('NAV');
|
||||||
|
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.all(1.0),
|
padding: const EdgeInsets.all(1.0),
|
||||||
@@ -178,9 +179,9 @@ class _ChannelMediaDisplayScreenState extends State<ChannelMediaDisplayScreen> {
|
|||||||
builder: (context) => StreamChannel(
|
builder: (context) => StreamChannel(
|
||||||
channel: channel,
|
channel: channel,
|
||||||
child: FullScreenMedia(
|
child: FullScreenMedia(
|
||||||
mediaAttachments: [
|
mediaAttachments:
|
||||||
media[position].attachment,
|
media.map((e) => e.attachment).toList(),
|
||||||
],
|
startIndex: position,
|
||||||
message: media[position].message,
|
message: media[position].message,
|
||||||
sentAt: media[position].message.createdAt,
|
sentAt: media[position].message.createdAt,
|
||||||
userName: media[position].message.user.name,
|
userName: media[position].message.user.name,
|
||||||
@@ -190,13 +191,15 @@ class _ChannelMediaDisplayScreenState extends State<ChannelMediaDisplayScreen> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
child: media[position].attachment.type == 'image'
|
child: media[position].attachment.type == 'image'
|
||||||
? ImageAttachment(
|
? IgnorePointer(
|
||||||
attachment: media[position].attachment,
|
child: ImageAttachment(
|
||||||
message: media[position].message,
|
attachment: media[position].attachment,
|
||||||
showTitle: false,
|
message: media[position].message,
|
||||||
size: Size(
|
showTitle: false,
|
||||||
MediaQuery.of(context).size.width * 0.8,
|
size: Size(
|
||||||
MediaQuery.of(context).size.height * 0.3,
|
MediaQuery.of(context).size.width * 0.8,
|
||||||
|
MediaQuery.of(context).size.height * 0.3,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: VideoPlayer(media[position].videoPlayer),
|
: VideoPlayer(media[position].videoPlayer),
|
||||||
|
|||||||
Reference in New Issue
Block a user