How to get Silver AppBar Status

Hi everyone!
I need to show or hide widgets based on if the AppBar is expanded or collapsed.
I am really struggling with it. i never created a custom function and i am really struggling to do it.

Please can anyone help me??

Thanks in advance!

2
3 replies