feat: Added images for photos modal
This commit is contained in:
@@ -218,12 +218,14 @@ class _ImageFooterState extends State<ImageFooter> {
|
|||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
physics: NeverScrollableScrollPhysics(),
|
physics: NeverScrollableScrollPhysics(),
|
||||||
itemBuilder: (context, position) {
|
itemBuilder: (context, position) {
|
||||||
|
Widget media;
|
||||||
|
|
||||||
if (widget.mediaAttachments[position].type == 'video') {
|
if (widget.mediaAttachments[position].type == 'video') {
|
||||||
var controllerPackage = widget.videoPackages[
|
var controllerPackage = widget.videoPackages[
|
||||||
videoAttachments
|
videoAttachments
|
||||||
.indexOf(widget.mediaAttachments[position])];
|
.indexOf(widget.mediaAttachments[position])];
|
||||||
|
|
||||||
return InkWell(
|
media = InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
widget.mediaSelectedCallBack(position);
|
widget.mediaSelectedCallBack(position);
|
||||||
},
|
},
|
||||||
@@ -235,7 +237,7 @@ class _ImageFooterState extends State<ImageFooter> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return InkWell(
|
media = InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
widget.mediaSelectedCallBack(position);
|
widget.mediaSelectedCallBack(position);
|
||||||
},
|
},
|
||||||
@@ -254,6 +256,28 @@ class _ImageFooterState extends State<ImageFooter> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return Stack(
|
||||||
|
children: [
|
||||||
|
media,
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.all(8.0),
|
||||||
|
child: Align(
|
||||||
|
alignment: Alignment.topLeft,
|
||||||
|
child: UserAvatar(
|
||||||
|
user: widget.message.user,
|
||||||
|
constraints: BoxConstraints.tight(
|
||||||
|
Size(
|
||||||
|
24,
|
||||||
|
24,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
showOnlineStatus: false,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
},
|
},
|
||||||
itemCount: widget.mediaAttachments.length,
|
itemCount: widget.mediaAttachments.length,
|
||||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
|
|||||||
Reference in New Issue
Block a user