spaceProvider top-level property

dynamic spaceProvider
final

Map a spaceId to the space, keeps up to date with underlying client throws is the space isn’t found.

Implementation

final spaceProvider =
    FutureProvider.family<Space, String>((ref, spaceId) async {
  final maybeSpace = await ref.watch(maybeSpaceProvider(spaceId).future);
  if (maybeSpace != null) {
    return maybeSpace;
  }
  throw 'Space not found';
});