body property

Widget? body
final

The primary content of the scaffold.

Displayed below the appBar, above the bottom of the ambient MediaQuery's MediaQueryData.viewInsets, and behind the floatingActionButton and drawer. If resizeToAvoidBottomInset is false then the body is not resized when the onscreen keyboard appears, i.e. it is not inset by viewInsets.bottom.

The widget in the body of the scaffold is positioned at the top-left of the available space between the app bar and the bottom of the scaffold. To center this widget instead, consider putting it in a Center widget and having that be the body. To expand this widget instead, consider putting it in a SizedBox.expand.

If you have a column of widgets that should normally fit on the screen, but may overflow and would in such cases need to scroll, consider using a ListView as the body of the scaffold. This is also a good choice for the case where your body is a scrollable list.

Implementation

final Widget? body;