removeRecursive method

void removeRecursive()
inherited

Recursive version of Component.remove. This should only be called when you know this is the only part of the branch you are removing in your operation. If your operation could remove items from the same branch multiple times, you should consider building up a list of the individual items to remove and then remove them individually to avoid calling remove multiple times on children.

Implementation

void removeRecursive() {
  Set<Component> deathRow = {this};
  forEachChild((child) => deathRow.add(child));
  deathRow.forEach(context.removeObject);
}