clearChildren function

void clearChildren(
  1. Element parent
)

Removes all children of parent.

Implementation

void clearChildren(web.Element parent) {
  while (parent.firstChild != null) {
    parent.removeChild(parent.firstChild!);
  }
}