Container

Container is a widget in Flutter that allows you to create a rectangular visual element that can contain other widgets. It provides a way to customize the look and feel of its child widget(s) by setting properties such as padding, margin, color, shape and more.

Here's an example of how to use Container widget in Flutter:

Container(
  width: 100,
  height: 100,
  color: Colors.blue,
  child: Text("Hello World!"),
);

In this example, we are creating a blue colored Container of width and height 100 pixels, with the child being a Text widget with the text "Hello World!".

Attributes