ensureRemove method
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();
}