createLearningPath method
Implementation
Future<LearningPathModel> createLearningPath({
required String orgId,
required String name,
String? description,
bool isOnboarding = false,
}) async {
final response = await _client
.from('learning_paths')
.insert({
'org_id': orgId,
'name': name,
// ignore: use_null_aware_elements
if (description != null) 'description': description,
'is_onboarding': isOnboarding,
'created_by': _userId,
})
.select()
.single();
return LearningPathModel.fromJson(response);
}