remove method

void remove(
  1. Component component
)

Removes a component from the component tree, calling onRemove for it and its children.

Implementation

void remove(Component component) {
  if (component._state != LifecycleState.removing) {
    lifecycle._removals.add(component);
    component._state = LifecycleState.removing;
  }
}