buildUserHeader method
Implementation
Widget buildUserHeader(BuildContext context, String id) =>
FutureBuilder<AbstractChatUser>(
future: getUser(id),
builder: (context, snap) => snap.hasData
? Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
if (widget._getChatStyle() == ChatStyle.tiles) ...[
Text(snap.data!.name),
Gap(8),
],
Text(widget.messageTimeFormatter(
context.pylon<AbstractChatMessage>().timestamp))
.xSmall()
.muted()
.light()
],
)
: const SizedBox.shrink());