waitFuturesList function
@internal An optimized version of Future.wait.
Implementation
Future<void>? waitFuturesList(List<Future<void>> futures) {
switch (futures.length) {
case 0:
return null;
case 1:
return futures[0];
default:
return Future.wait(futures).then(_ignore);
}
}