wait static method
Same as Future.wait but nullable.
Implementation
static Future wait(Iterable<Future?> futures) async {
final futuresToWait = futures.where((item) => item != null).cast<Future>();
if (futuresToWait.length > 0) {
await Future.wait(futuresToWait);
}
}