Learn
The Column widget is just like the Row widget, except that it was designed to help us lay out multiple child widgets vertically, not horizontally.
The syntax for creating a column is very similar to the Row widget:
Column( children: const [Widgets], )
For example:
Column( children: const [ Text('Top'), Text('Bottom!') ] )
Let’s try it out!
Instructions
Change the Row into a Column and see its effect on the app!
Hint
Change the word Row
to Column
.
Solution
The call to runApp
should look like:
runApp(MaterialApp( home: Scaffold( body: Column( children: const [icon1, icon2, icon3] ) ) ));
Take this course for free
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.