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