getAllExercisesOfCategory method
- String categoryName
Returns all exercises of one category.
Implementation
Future<List<Map<String, dynamic>>> getAllExercisesOfCategory(
String categoryName) async {
final snapshot = await firestore
.collection('exercises')
.where('category', isEqualTo: categoryName)
.get();
return snapshot.docs.map((doc) => doc.data()).toList();
}