Column- Widget

A Column is a layout widget that arranges its children vertically, from top to bottom. It’s commonly used for stacking widgets like Text, Buttons, Image, etc., in a vertical list.

Source Code​

				
					Column(
  crossAxisAlignment: CrossAxisAlignment.start,
  mainAxisAlignment: MainAxisAlignment.center,
  children: [
    Text('Title', style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold)),
    SizedBox(height: 10),
    Text('This is a description.'),
    ElevatedButton(
      onPressed: () {},
      child: Text('Click Me'),
    ),
  ],
)

				
			

Ai Code Analizer

🎨 3. Important Properties

PropertyDescription
childrenA list of widgets to arrange vertically.
mainAxisAlignmentControls vertical alignment (e.g., start, center, spaceBetween).
crossAxisAlignmentControls horizontal alignment (e.g., start, center, end).
mainAxisSizeControls whether the column takes up all available vertical space or not.
textDirectionDetermines layout direction (LTR or RTL).