Gwhyyy
Gwhyyy

Reputation: 9166

why th Scaffold widget is a StatefulWidget?

by coincidence, I looked at the Scaffold widget implementation source code, then I noticed that it's a StateFulWidget

why it's a StatefullWidget? what parts or things need it to be StatefullWidget?

Upvotes: 0

Views: 61

Answers (1)

eamirho3ein
eamirho3ein

Reputation: 17890

Scaffold widget has a feature called drawer, which has a state for itself, so when you need to open it, Scaffold changes its state and open it. Other feature like showing snackBars, BottomSheet and FloatingActionButton do the same.

Upvotes: 4

Related Questions