Hi, I'm trying to get the image in the chat box to be clickable and showed bigger on screen with the ability to zoom in/out. I've been trying to implement https://pub.dev/packages/photo_view without any success.
I also found a way to connect GestureDetector to any images in the chatbox but I need external help to continue.
//CODE
`
: document['type'] == 1
// Image
? Container(
child: GestureDetector(
onTap: () {
},
child: Material(
child: CachedNetworkImage(
placeholder: (context, url) => Container(
child: CircularProgressIndicator(
valueColor: AlwaysStoppedAnimation<Color>(themeColor),
),
width: 200.0,
height: 200.0,
padding: EdgeInsets.all(70.0),
decoration: BoxDecoration(
color: greyColor2,
borderRadius: BorderRadius.all(
Radius.circular(8.0),
),
),
),
errorWidget: (context, url, error) => Material(
child: Image.asset(
'images/img_not_available.jpeg',
width: 200.0,
height: 200.0,
fit: BoxFit.cover,
),
borderRadius: BorderRadius.all(
Radius.circular(8.0),
),
clipBehavior: Clip.hardEdge,
),
imageUrl: document['content'],
width: 200.0,
height:200.0,
fit: BoxFit.fill,
),
borderRadius: BorderRadius.all(Radius.circular(8.0)),
clipBehavior: Clip.hardEdge,
),
)
) `
Thank you.