reviewSummariesForDomain function

  1. @riverpod
Future<Map<String, ({bool due, int? intervalDays})>> reviewSummariesForDomain(
  1. Ref<Object?> ref,
  2. String domainId
)

Map of topicId -> longest interval + due flag for review cards in a domain. Topics with no cards are absent from the map.

Implementation

@riverpod
Future<Map<String, ({int? intervalDays, bool due})>> reviewSummariesForDomain(
  Ref ref,
  String domainId,
) async {
  final ds = ref.watch(supabaseDatasourceProvider);
  return ds.getReviewSummariesForDomain(domainId);
}