myUpcomingEventListProvider top-level property
final
Implementation
final myUpcomingEventListProvider = FutureProvider.autoDispose
.family<List<ffi.CalendarEvent>, String?>((ref, spaceId) async {
List<ffi.CalendarEvent> allUpcomingEventList =
await ref.watch(allUpcomingEventListProvider(spaceId).future);
List<ffi.CalendarEvent> myUpcomingEventList = [];
for (final event in allUpcomingEventList) {
final myRsvpStatus = await ref
.watch(myRsvpStatusProvider(event.eventId().toString()).future);
if (myRsvpStatus == ffi.RsvpStatusTag.Yes) {
myUpcomingEventList.add(event);
}
}
return myUpcomingEventList;
});