All layout widgets have either of the following:

A child property if they take a single child—for example,
Center or Container

A children property if they take a list of widgets—for example,
Row, Column, ListView, or Stack.

Add the Text widget to the Center widget:

4. Add the layout widget to the page

A Flutter app is itself a widget, and most widgets have a build()
method. Instantiating and returning a widget in the app’s build() method
displays the widget.

Material apps

For a Material app, you can use a Scaffold widget;
it provides a default banner, background color,
and has API for adding drawers, snack bars, and bottom sheets.
Then you can add the Center widget directly to the body
property for the home page.

lib/main.dart (MyApp)