update method

  1. @mustCallSuper
void update(
  1. covariant Component newComponent
)

Change the component used to configure this element.

The framework calls this function when the parent wishes to use a different component to configure this element. The new component is guaranteed to have the same runtimeType as the old component.

This function is called only during the "active" lifecycle state.

Implementation

@mustCallSuper
void update(covariant Component newComponent) {
  assert(_lifecycleState == _ElementLifecycle.active);
  assert(_component != null);
  assert(newComponent != component);
  assert(_depth != null);
  assert(Component.canUpdate(component, newComponent));
  _component = newComponent;
}