roomMembershipProvider top-level property
final
Get the user’s membership for a specific space based off the roomId will not throw if the client doesn’t kow the room
Implementation
final roomMembershipProvider = FutureProvider.family<Member?, String>(
(ref, roomId) async {
final room = await ref.watch(maybeRoomProvider(roomId).future);
if (room == null || !room.isJoined()) return null;
return await room.getMyMembership();
},
);