Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
In this first, a little bit more realistic application, I want to build a very simple personality quiz
application where you answer a couple of questions and based on the choices you made, we charge your personality.
For that, we'll use that current application we have here, this very lean application where we right
now only output the default text and we'll build up on that to present a question and some buttons that
allow the user to choose an answer.
Now for that, we certainly need a text widget to output the question and below that, I want to have
a couple of buttons that allow the user to choose different answers
and now here's a problem. We have
body and body is the place where we add the widget that should be shown in all that white area
and body only takes one widget,
I can't add a second widget here, I can't add another text, second text. You already see I get an error
here because now this would actually not be passed as an additional value to body But Dart would try
to pass this as a positional argument passed to scaffold which doesn't take any positional arguments
here.
So that does not work
and we also can't concatenate this by adding a plus here,
all of that doesn't work.
We can really only pass one widget here to body
so what can we do?
I want to pass more than one widget, I want to have a text and a couple of buttons.
For this, it's important to understand
that we have different types of widgets in Flutter.
We have the visible widgets which are related to user input and to outputting data, things like a button
or a text or a card
and we have only seen the text from all these examples here thus far but there are more widgets like
the RaisedButton which renders a button and other widgets and we'll see all of those throughout
the course.
Now these are the widgets which we see,
we see a button,
we see the text right,
that is what we see and that is of course crucial for any application
but equally crucial are invisible widgets that help us with layout and with controlling how our widget
tree behaves and how it looks like and there we got things like row, column, ListView and so on.
These are also widgets that ship with Flutter which we don't have to build ourselves, which we don't
see themselves but which help us with structuring our content. So these widgets give our app structure and
control how visible widgets are drawn onto the screen and therefore of course, they're super important.
There also is a very important widget which also ships with Flutter, the container widget which kind
of belongs into both categories as you will learn once we use it because it by default is invisible
but you can also give it some styling so that you can see it
but before we focus on that, let's actually take row, column and so on to work on our quiz app and add both a
question and a couple of answer buttons.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.