Property Name | Property Description | Example | Explanation |
---|---|---|---|
mainAxisAlignment | Specifies how the children should be vertically aligned within a column. | MainAxisAlignment.start |
Aligns the children to the top of the column. |
crossAxisAlignment | Specifies how the children should be horizontally aligned within a column. | CrossAxisAlignment.center |
Aligns the children to the center of the column horizontally. |
mainAxisSize | Determines how much vertical space the column occupies in the main axis. | MainAxisSize.max |
The column takes up the maximum available vertical space. |
verticalDirection | Specifies the direction in which the children are placed vertically. | VerticalDirection.up |
The children are laid out in reverse order, starting from the bottom. |
textBaseline | Specifies how the text baseline should be aligned within a column. | TextBaseline.alphabetic |
Aligns the text baseline of the children along a common baseline. |
textDirection | Specifies the order of the children in the horizontal direction. | TextDirection.ltr |
The children are laid out from left to right. |
children | The widgets to be placed inside the column. | ```Column( | Two Text widgets are placed vertically inside the column. |
children: [ | |||
Row( | |||
children: [ | |||
Text('Widget 1'), | |||
Text('Widget 2'), | |||
], | |||
), | |||
Text('Widget 3'), | |||
], | |||
)``` | |||
key | An identifier for the column widget. | Key('unique_key') |
Provides a way to uniquely identify the column widget. |
verticalGestureDetector | A gesture detector for handling vertical gestures on the column. | ```VerticalGestureDetector( | Handles vertical drag gestures within the column. |
onVerticalDragDown: _handleDrag | |||
)``` | |||
backgroundColor | The background color of the column. | ```Container( | |
Sets the background color of the column to blue. | |||
child: Column(...), | |||
)``` | |||
crossAxisAlignment | The vertical alignment of the children when they do not fill the available vertical space. | CrossAxisAlignment.stretch |
The children will be stretched vertically to fill the available space. |
mainAxisAlignment | The horizontal alignment of the children when they do not fill the available horizontal space. | MainAxisAlignment.spaceEvenly |
The children will be spaced evenly along the main axis. |
verticalDirection | Specifies the direction in which the children are placed vertically. | VerticalDirection.down |
The children are laid out from top to bottom (default behavior). |
mainAxisSize | Determines how much vertical space the column occupies in the main axis. | MainAxisSize.min |
The column takes up the minimum required vertical space. |
textBaseline | Specifies how the text baseline should be aligned within a column. | TextBaseline.ideographic |
Aligns the text baseline of the children along the ideographic baseline. |
textDirection | Specifies the order of the children in the horizontal direction. | TextDirection.rtl |
The children are laid out from right to left. |
Created
May 25, 2023 01:14
-
-
Save ukantjadia/05e7e576858cd6c104acf86c0c31be83 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment