How to stay child widget state when collapse it

Hi,
I noticed that when i collapse the child widget, it always rerender.
But if the child widget has many content, rerender will spend mush time.
Is there any way to solve it.
Thanks in advance.