All language subtitles for 14. Containers vs Columns vs Rows

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French Download
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

So throughout this course section,

we worked a bit with columns, rows and containers and these are, as you probably can tell already, three

very important widgets that Flutter offers you and hence it's super important that you understand how

container and column and row can work together and where they differ.

Now one important difference of course is that a container takes exactly one child widget and the columns

and rows on the opposite take multiple, an unlimited amount actually of child widgets which you pass

in that list of children

and that's of course a crucial difference.

Another difference is that a container, unlike column and row, gives you rich alignment and styling options,

as you saw you can add a decoration with this separate BoxDecoration object where you can add a border,

a color, you can add margin and padding to a container, you can align things in the container if you want

to. On column and row, you also have alignment options, on the cross and main axis but you have no styling

options,

if you want to give a column a border, that's not possible with the column alone.

Now for the container, you also have a lot of options for the width.

It's pretty flexible,

by default it takes the child width

but it also takes the available parent width if you have a parent with a fixed width.

You can also give it its own width, you can set a width on the container and it will then take that

and there are different rules and there's a different order on how a container sizes itself

and in the official docs, you can read all about the exact order if you're interested in that.

The core takeaway here is that you can really size the container, by the way not just regarding its width

but also regarding its height as you want. For columns and rows,

it's a bit different, there by default

a column always takes the full available height and a row takes the full available width but that's

basically it,

you have no extra options or arguments you can set on column and row to configure the width and height.

And therefore to sum it up, a container is perfect for custom styling, alignment, sizing, it's your go to

widget if you want to wrap another widget because you want to transform that other widget because you

want to assign some styling. On the other hand, columns and rows are must use widgets

if you have widgets that sit next or above each other,

so if you have more than one widget in a row or in a column, then there is no way around column

and row basically.

The really important takeaway here however is not that you always have to choose one of these two

but that you can combine them together, wrap a column in a container or use a container in a column or

in a row of course and you can then mix and match effects.

You can have your own boxes with certain stylings inside of a column or you wrap your overall column

to, for example add a border around it.

That is all possible, so don't see containers and columns and rows as alternatives but see them as crucial

building blocks in Flutter that can be mixed and matched to build a really flexible user interfaces.

Now obviously, there are other important widgets too,

it's not just container columns and rows but these three widgets will actually be commonly used and will

get you very far.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.