build method
dynamic
build( - dynamic context,
- dynamic ref
)
Implementation
@override
Widget build(BuildContext context, WidgetRef ref) {
final invited =
ref.watch(roomInvitedMembersProvider(roomId)).valueOrNull ?? [];
final joined = ref.watch(membersIdsProvider(roomId)).valueOrNull ?? [];
final room = ref.watch(maybeRoomProvider(roomId)).valueOrNull;
return Card(
child: ListTile(
title: !isInvited(userId, invited) && !isJoined(userId, joined)
? Text(L10n.of(context).directInviteUser(userId))
: Text(userId),
trailing: room != null
? UserStateButton(
userId: userId,
room: room,
)
: const Skeletonizer(child: Text('Loading room')),
),
);
}