I know you can use await Future.wait([firstResult, secondResult]);
to make multiple async calls at once, but how do you make multiple Firestore calls at once like this:
final jobs = await fireDb
.collection(FIRE_DB_JOBS)
.doc(fireAuthUseCases.getEmail())
.withConverter<JobsEntity>(
fromFirestore: JobsEntity.fromFirestore,
toFirestore: (JobsEntity jobsEntity, _) => jobsEntity.toFirestore(),
).get();
Recognized by Google Cloud Collective
Ah I was missing brackets ;-(
List responses = await Future.wait([
fireDb
.collection(FIRE_DB_JOBS)
.doc(fireAuthUseCases.getEmail())
.withConverter(
fromFirestore: JobsEntity.fromFirestore,
toFirestore: (JobsEntity jobsEntity, _) => jobsEntity.toFirestore(),
).get()
]
);