buildUserHeader method

Widget buildUserHeader(
  1. BuildContext context,
  2. String id
)

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());