build method

  1. @override
dynamic build(
  1. dynamic context,
  2. dynamic ref
)

Implementation

@override
Widget build(BuildContext context, WidgetRef ref) {
  final displayName =
      ref.watch(roomDisplayNameProvider(roomId)).valueOrNull ??
          L10n.of(context).unknown;
  final avatarSize = Theme.of(context).textTheme.bodyMedium?.fontSize ?? 14.0;
  return Tooltip(
    message: roomId,
    child: ActerInlineTextButton.icon(
      icon: ActerAvatar(
        options: AvatarOptions(
          ref.watch(roomAvatarInfoProvider(roomId)),
          size: avatarSize,
        ),
      ),
      label: Text(displayName, overflow: TextOverflow.ellipsis),
      onPressed: () async {
        await navigateToRoomOrAskToJoin(context, ref, roomId);
      },
    ),
  );
}