wait static method

Future wait(
  1. Iterable<Future?> futures
)

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);
  }
}