getTotalCardCount method

Future<int> getTotalCardCount()

Implementation

Future<int> getTotalCardCount() async {
  final userId = _client.auth.currentUser?.id;
  if (userId == null) return 0;

  final response = await _client
      .from('review_cards')
      .select('id')
      .eq('user_id', userId);
  return (response as List<dynamic>).length;
}