Column Widget is an invisible widget, it's used to control the layout of the app as the name suggests, the widgets passed into a column will get stacked on top of each other vertically similar to the shape of a column.

Column takes children as an argument which accepts a list of widgets. This list only accepts type of Widget. <Widget>[]

Column(
          children:<Widget> [],
        ),

 

 

we use Column when we want to pass on multiple widgets to a widgets child. 

In the example below, we used the column to pass on multiple widgets (text and two buttons on top of each other) to a scaffold's body.

import 'package:flutter/material.dart';

// void main(){
//   runApp(MyApp());
// }

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('My Title'),
        ),
        body: Column(
          children: [
            Text('What is your name?'),
            RaisedButton(child: Text('Answer 1'),onPressed: null,),
            RaisedButton(child: Text('Answer 2'),onPressed: null,),
            RaisedButton(child: Text('Answer 3'),onPressed: null,),
          ],
        ),
      ),
    );
  }
}

 

 

onpressed argument is what you want to happen when the button is pressed, more on this will be covered in more detail