ensureAddAll method

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

Makes sure that the components are added to the tree if you wait for the returned future to resolve.

Implementation

Future<void> ensureAddAll(Iterable<Component> components) async {
  await addAll(components);
  await components.first.findGame()!.ready();
}