So, as the title says, I can't return anything inside of a foreach in this function. It is not a problem of the conditional because I have tried it and it works, I can enter in it, I can even print a text, but I cannot return anything, which is weird, maybe forEach in dart works different than I know?

```
Future<String> getEnrollment(idU) async {
  final querySnapshot =
      await FirebaseFirestore.instance.collection('Enrollment').get();

  querySnapshot.docs.forEach((doc) {
    if (doc['infoCar']['idUser'] == idU) {
      return doc.id; // I can't return this one.
    }
  });

  return null;
}

```