Home > front end >  why th Scaffold widget is a StatefulWidget?
why th Scaffold widget is a StatefulWidget?

Time:10-13

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

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

CodePudding user response:

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.

  • Related