String removeChild(input)

Remove a child from this node. input can be either an instance of Node or a String.

Source

String removeChild(dynamic input) {
  if (input is String) {
    children.remove(getChild(input));
    return input;
  } else if (input is Node) {
    children.remove(input);
  } else {
    throw new Exception("Invalid Input");
  }
  return null;
}