DEV Community

Bret
Bret

Posted on

WHATS A TYPICAL FLUTTER CLASS / WIDGET STRUCTURE?

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?

Top comments (1)

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.