Add profile images to chats

This commit is contained in:
Brandon Presley 2023-12-29 17:10:47 +13:00
parent 5fbc8bee42
commit 1376580e7e

View File

@ -50,10 +50,20 @@ class _RoomPageState extends State<RoomPage> {
itemCount: timeline?.events.length, itemCount: timeline?.events.length,
reverse: true, reverse: true,
itemBuilder: (context, index) => ListTile( itemBuilder: (context, index) => ListTile(
title: Text(timeline!.events[index].senderFromMemoryOrFallback title: Text(timeline!
.displayName ?? .events[index].senderFromMemoryOrFallback.displayName
""), .toString()),
subtitle: Text(timeline!.events[index].body), subtitle: Text(timeline!.events[index].body),
leading: timeline?.events[index].senderFromMemoryOrFallback
.avatarUrl !=
null
? CircleAvatar(
foregroundImage: NetworkImage(timeline!.events[index]
.senderFromMemoryOrFallback.avatarUrl!
.getThumbnail(widget.room.client,
width: 50, height: 50)
.toString()))
: null,
)), )),
), ),
TextFormField( TextFormField(