rebuild method

void rebuild()

Rebuilds the child widget configuration and updates the child element.

Implementation

void rebuild() {
  final builtWidget = runZoned(() {
    return state.build(this);
  }, zoneValues: {#buildContext: this});

  if (childElement != null &&
      childElement!.widget.runtimeType == builtWidget.runtimeType) {
    childElement!.update(builtWidget);
  } else {
    childElement?.unmount();
    childElement = builtWidget.createElement();
    childElement!.mount(this);
  }
}