Hi,
I have a doubt about why you use Future.wait(userFutures),
instead, we can await the future in the above line
userFutures=await userIds.map((id) => getUserData(id));
Whenever you wants to get the response together from multiple things, you can use wait. It will wait for all the actions and once all the actions will complete their tasks, the Future.wait() will return the combined values.