void removeNode(String path)

Removes the method at the specified path. In order for this method to work, the node provider must be mutable. If you did not specify a custom node provider, the created provider is mutable.

Source

void removeNode(String path) {
  if (provider is! MutableNodeProvider) {
    throw new Exception("Unable to Modify Node Provider: It is not mutable.");
  }
  (provider as MutableNodeProvider).removeNode(path);
}