performRebuildOn method

void performRebuildOn(
  1. Element child
)

Rebuilds child and correctly accounts for any asynchronous operations that can occur during the initial build of the app. We want the component and element apis to stay synchronous, so this delays the execution of child.performRebuild() instead of calling it directly.

Implementation

void performRebuildOn(Element child) {
  final Object? result = child.performRebuild() as dynamic;
  assert(
    result is! Future,
    '${child.runtimeType}.performBuild() returned a Future while rebuilding.\n\n'
    'Only server builds are allowed to be asynchronous.',
  );
  child.didRebuild();
}