getProgress method
- String topicId
Implementation
Future<UserTopicProgressModel?> getProgress(String topicId) async {
final userId = _client.auth.currentUser?.id;
if (userId == null) return null;
final response = await _client
.from('user_topic_progress')
.select()
.eq('user_id', userId)
.eq('topic_id', topicId)
.maybeSingle();
if (response == null) return null;
return UserTopicProgressModel.fromJson(response);
}