All language subtitles for 40. Outputting Widgets Conditionally

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
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

Now let's start with the ternary expression and therefore here, you first of all have your condition.

The condition here could be without the if keyword,

that's how you'll write a ternary expression.

So the condition here can be the same condition as up there,

is the question index smaller than the question length? If this is the case, then you add a question mark,

this will then mark the border to the code which should run if this is true.

So the thing after the question mark is used

if this condition is true and then you need to add a colon after the code block that should be used

if this is true

and this part after the question mark must only be one expression, here since it's a lot of lines, it

looks like it's more than one expression but in the end, it's only the column here,

right?

It's only the column, all the other stuff is in the column.

So only the column here is created

if that is true and therefore after the column down there, we add a colon

and now we have the so-called else block.

We didn't have an else block up there but we could add it here as well,

you can add else here and then you can define code that should run if the condition is not met,

so if this here, if this returns false, then you will go into the else block. By the way in if statements

like this here,

you can also have else if statements where you could add other conditions which are checked if the first

condition is not met but let's ignore that for now. For the ternary expression here down in our body,

we don't have else if but we do have our main code,

if the condition is met and then after the colon, we have our else block

and now that could be a center widget which is another widget baked into Flutter that centers all

the content horizontally and vertically on the page.

It takes a child and that is then the widget which should be centered

and this could simply be some text like you did it and let's add a trailing comma here, reformat everything

and now we have a ternary expression. If we now reload this application and we go back,

now I can select my answers but after the third button click, we don't get the error but we get

you did it

and that's of course way nicer and already a better user experience.

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