chatImage static method
Widget
chatImage(
- BuildContext context,
- String id,
- dynamic listMessage,
- String? chatContent,
- int index,
- bool logUserMsg,
Implementation
static Widget chatImage(BuildContext context, String id, var listMessage,
String? chatContent, int index, bool logUserMsg) {
return Container(
child: ElevatedButton(
child: Material(
child: kIsWeb
? widgetShowImages(chatContent!, 250)
: widgetShowImages(chatContent!, 100),
borderRadius: BorderRadius.all(Radius.circular(10.0)),
clipBehavior: Clip.hardEdge,
),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ZoomImage(url: chatContent)));
},
style: ElevatedButton.styleFrom(padding: EdgeInsets.all(10.0))),
margin: logUserMsg
? EdgeInsets.only(
bottom: ChatData.isLastMessageRight(listMessage, id, index)
? 20.0
: 10.0,
right: 10.0)
: EdgeInsets.only(left: 10.0),
);
}