performRebuild method
Cause the component to update itself.
Called by BuildOwner after the appropriate checks have been made.
Implementation
@override
void performRebuild() {
assert(_debugSetAllowIgnoredCallsToMarkNeedsBuild(true));
Component? built;
try {
assert(() {
_debugDoingBuild = true;
return true;
}());
built = build();
assert(() {
_debugDoingBuild = false;
return true;
}());
} catch (e, st) {
_debugDoingBuild = false;
// TODO: implement actual error component
built = DomComponent(
tag: 'div',
child: Text("Error on building component: $e"),
);
print('Error: $e $st');
} finally {
_dirty = false;
assert(_debugSetAllowIgnoredCallsToMarkNeedsBuild(false));
}
_child = updateChild(_child, built, null);
}