performRebuild method
Builds the child widget and makes the child show it. A build that throws is reported to the owner, and the child shows what the owner returns instead; so is what is thrown below as the child is made to show it, other than by the builds there (a createRenderObject, updateRenderObject, initState or didUpdateWidget), which goes on up when the owner has no BuildOwner.onBuildError.
Implementation
@override
void performRebuild() {
Widget built;
try {
_beginDependencies();
try {
built = build();
} finally {
_endDependencies();
}
_built();
} on Object catch (error, stack) {
built = _failedWith(this, error, stack);
_failed = true;
} finally {
super.performRebuild();
}
try {
_child = updateChild(_child, built, slot);
} on Object catch (error, stack) {
if (owner!.onBuildError == null) {
rethrow;
}
_showError(this, error, stack);
}
_childrenUpdated();
}