DEV Community

Cover image for Flutter General Page Structures
Baransel
Baransel

Posted on

Flutter General Page Structures

In this lesson, we will talk about the widgets we use while designing our screen in Flutter in general, and their features and usage areas. In other words, we can say that they are structures where we adjust how we place our elements, such as a little alignment and button/image. It may also be the bone structure. We will cover page design, widget design and features.

Center

First, we can start with the Center widget. Center widget means align center. It places the enclosed element in the center of the screen. And since the Center widget can only have one widget, it uses child.

As an example, you can try writing the code and how it looks like below:

const Center(
        child: Text(
          "Baransel Arslan",
          style: TextStyle(fontSize: 20),
        ),
      )
Enter fullscreen mode Exit fullscreen mode

If you write the code in the body part of Scaffold, we can notice that the Text widget it contains is located in the center of the page, as we can see below.

Flutter Center widget

Container

Continue this post on my blog! Flutter General Page Structures.

Top comments (0)