addAll method

Future<void> addAll(
  1. Iterable<Component> components
)

A convenience method to add multiple children at once.

Implementation

Future<void> addAll(Iterable<Component> components) {
  final futures = <Future<void>>[];
  for (final component in components) {
    final future = add(component);
    if (future != null) {
      futures.add(future);
    }
  }
  return Future.wait(futures);
}