ensureRemove method

Future<void> ensureRemove(
  1. Component component
)

Makes sure that the component is removed from the tree if you wait for the returned future to resolve.

Implementation

Future<void> ensureRemove(Component component) async {
  remove(component);
  await component.findGame()!.ready();
}