maybeSpaceInfoProvider top-level property
final
Get the SpaceItem of a spaceId or null if the space wasn’t found. Keeps up to date with the underlying client even if the space wasn’t found initially.
Implementation
final maybeSpaceInfoProvider =
FutureProvider.autoDispose.family<SpaceItem?, String>((ref, spaceId) async {
final space = await ref.watch(maybeSpaceProvider(spaceId).future);
if (space == null || !space.isJoined()) {
return null;
}
final avatarInfo = ref.watch(roomAvatarInfoProvider(spaceId));
final membership = await space.getMyMembership();
return SpaceItem(
space: space,
roomId: spaceId,
membership: membership,
activeMembers: [],
avatarInfo: avatarInfo,
);
});