DEV Community

loading...

WHATS A TYPICAL FLUTTER CLASS / WIDGET STRUCTURE?

yobretyo profile image Bret ・1 min read

Between widgets and class,
What’s a typical OUTLINE of a widget? When do I is it always using scaffold inside of container? Or what goes inside of what?

Discussion (1)

pic
Editor guide
Collapse
immurderer profile image
João Pedro Prado

Flutter just require an "App" Widget, like an MaterialApp, everything else is up to you. In most cases, we use a Scaffold because it has the basic structure of a "Material" application, which is an AppBar as a header, with or without actions and a menu button in it, a body and optionally a Floating Action Button. In some cases you just need a blank screen, in those cases you may use a Container with a Column inside, or a Center, or a ListView.