reassemble method

void reassemble (
  1. Element root
)

Cause the entire subtree rooted at the given Element to be entirely rebuilt. This is used by development tools when the application code has changed and is being hot-reloaded, to cause the widget tree to pick up any changed implementations.

This is expensive and should not be called except during development.

Implementation

void reassemble(Element root) {
  Timeline.startSync('Dirty Element Tree');
  try {
    assert(root._parent == null);
    assert(root.owner == this);
    root.reassemble();
  } finally {
    Timeline.finishSync();
  }
}