ABSTRACT

In this chapter, you will learn to build layouts for Flutter applications. You will explore the Flutter widgets useful for building layouts. The chapter will start from revisiting the HelloBooksApp from previous chapters to understand its screen layout. The layout widgets are helpful in laying out the widgets on the screen. They are like a collection of multiple widgets. A layout widget has multiple children widgets. There are two types of layout widgets: Single-child and Multi-child layout widgets. A Single-child layout type can have only one child widget assigned to it. A few examples of Single-child widgets are Container and Padding widgets. A Multi-child layout can have more than one child assigned to it. Few examples of Multi-child layouts are ListView, Row, Column, GridView, and Stack. The common layout widgets useful for creating the most common types of layouts are Container, ListView, Row, Column, Stack, and SizedBox. This chapter also discusses more specific widgets used for laying out screens like ConstrainedBox, SizedBox, IntrinsicHeight, IntrinsicWidth, and IndexedStack.