roomDisplayNameProvider top-level property

dynamic roomDisplayNameProvider
final

Caching the name of each Room

Implementation

final roomDisplayNameProvider = FutureProvider.family<String?, String>((
  ref,
  roomId,
) async {
  final room = await ref.watch(maybeRoomProvider(roomId).future);
  if (room == null) return null;
  return (await room.displayName()).text();
});