rebuild method
Re-calculates the panel's size forcefully when using PanelAutoSizing.
The then
callback is called when the recalculation work is done.
This is useful when you have changed (replaced) the PanelContent. and want the panel to adjust its size again.
Implementation
void rebuild({VoidCallback? then}) {
if (controlling) panel!.rebuild(then: then);
}