This commit is contained in:
@@ -185,21 +185,22 @@ class _FullScreenMediaState extends State<FullScreenMedia>
|
|||||||
widget.message, StreamChannel.of(context).channel);
|
widget.message, StreamChannel.of(context).channel);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
ImageFooter(
|
if (widget.message.type != 'ephemeral')
|
||||||
currentPage: _currentPage,
|
ImageFooter(
|
||||||
totalPages: widget.mediaAttachments.length,
|
currentPage: _currentPage,
|
||||||
mediaAttachments: widget.mediaAttachments,
|
totalPages: widget.mediaAttachments.length,
|
||||||
message: widget.message,
|
mediaAttachments: widget.mediaAttachments,
|
||||||
mediaSelectedCallBack: (val) {
|
message: widget.message,
|
||||||
setState(() {
|
mediaSelectedCallBack: (val) {
|
||||||
_currentPage = val;
|
setState(() {
|
||||||
_pageController.animateToPage(val,
|
_currentPage = val;
|
||||||
duration: Duration(milliseconds: 300),
|
_pageController.animateToPage(val,
|
||||||
curve: Curves.easeInOut);
|
duration: Duration(milliseconds: 300),
|
||||||
Navigator.pop(context);
|
curve: Curves.easeInOut);
|
||||||
});
|
Navigator.pop(context);
|
||||||
},
|
});
|
||||||
),
|
},
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ class _ImageFooterState extends State<ImageFooter> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final showShareButton = !kIsWeb;
|
||||||
return SizedBox.fromSize(
|
return SizedBox.fromSize(
|
||||||
size: Size(
|
size: Size(
|
||||||
MediaQuery.of(context).size.width,
|
MediaQuery.of(context).size.width,
|
||||||
@@ -91,8 +92,10 @@ class _ImageFooterState extends State<ImageFooter> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
kIsWeb
|
!showShareButton
|
||||||
? SizedBox()
|
? Container(
|
||||||
|
width: 48,
|
||||||
|
)
|
||||||
: IconButton(
|
: IconButton(
|
||||||
icon: StreamSvgIcon.iconShare(
|
icon: StreamSvgIcon.iconShare(
|
||||||
size: 24.0,
|
size: 24.0,
|
||||||
|
|||||||
@@ -63,38 +63,43 @@ class ImageHeader extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
backgroundColor:
|
backgroundColor:
|
||||||
StreamChatTheme.of(context).channelTheme.channelHeaderTheme.color,
|
StreamChatTheme.of(context).channelTheme.channelHeaderTheme.color,
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
IconButton(
|
if (message.type != 'ephemeral')
|
||||||
icon: StreamSvgIcon.iconMenuPoint(
|
IconButton(
|
||||||
color: StreamChatTheme.of(context).colorTheme.black,
|
icon: StreamSvgIcon.iconMenuPoint(
|
||||||
|
color: StreamChatTheme.of(context).colorTheme.black,
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
_showMessageActionModalBottomSheet(context);
|
||||||
|
},
|
||||||
),
|
),
|
||||||
onPressed: () {
|
|
||||||
_showMessageActionModalBottomSheet(context);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
title: InkWell(
|
title: message.type != 'ephemeral'
|
||||||
onTap: onTitleTap,
|
? InkWell(
|
||||||
child: Container(
|
onTap: onTitleTap,
|
||||||
height: preferredSize.height,
|
child: Container(
|
||||||
width: preferredSize.width,
|
height: preferredSize.height,
|
||||||
child: Column(
|
width: preferredSize.width,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: <Widget>[
|
mainAxisSize: MainAxisSize.min,
|
||||||
Text(
|
children: <Widget>[
|
||||||
userName,
|
Text(
|
||||||
style: StreamChatTheme.of(context).textTheme.headlineBold,
|
userName,
|
||||||
|
style: StreamChatTheme.of(context).textTheme.headlineBold,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
sentAt,
|
||||||
|
style: StreamChatTheme.of(context)
|
||||||
|
.channelPreviewTheme
|
||||||
|
.subtitle,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Text(
|
)
|
||||||
sentAt,
|
: SizedBox(),
|
||||||
style: StreamChatTheme.of(context).channelPreviewTheme.subtitle,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user