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
French
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 the last section, we got some text to show up inside of our APAs at the top of the screen, we're
not going to move on to making sure that we get a button that our users can press on the bottom right
hand corner of the screen as well.
Let's first take a look at the documentation for our scaffolded class and see if there's anything in
there that can help us with putting this button on the screen at the proper location, specifically
down here at the bottom.
Right.
So I'm going to go back over to my flitter documentation, I've already navigated back over to the scaffold
class.
If you've navigated away, remember, you can always search for scaffold on the top right hand side.
Once I'm at the scaffold class, I'm going to scroll down to the constructor again, so I'll go down,
down, down.
Here's my scaffold constructor right now, you and I are only making use of the named parameter of APSA.
So back inside of our code editor, we had created our scaffold and we created an app, our widget,
and assigned it to that named app, our parameter.
So now to get a button on the bottom right hand side the screen, we're going to create a second widget
and assign it to this floating action button parameter right here.
If we pass in a widget on this floating action button name parameter, the scaffold widget will automatically
take that widget and display it at the bottom right hand side, which is exactly what you and I are
trying to do.
Now, the other thing I want to mention here, before we go away from the documentation, I'm going
to scroll up just a little bit.
To this list of widgets right here, one of the widgets that you'll see listed is a widget called Floating
Action Button.
So we looked at the documentation for this or at least this line a couple of videos ago.
This widget will display a circular button that is typically shown and the bottom right corner of the
screen.
So if we create a new widget called the Floating Action Button and we assign it to that name parameter,
a floating action button, presumably we're going to get our button at the bottom right hand side.
So let's try this out right now.
I'm going to flip back over to my code editor, I'm going to find my scaffold widget and I'm going to
pass in an additional named parameter, so I'll say floating action.
Oops, floating.
Action button.
And then I'm going to assign to that a widget of floating action button like so.
OK, so right here, I want to take a quick pause, just to clear up a little bit of confusion that
you might have right now, there's two things about this line of code and this line of code that might
be a little bit confusing right now.
So the first thing you might be curious about is how are we able to make reference to something called
floating action button and abar when we clearly have not defined those inside this file.
So we are able to reference APAs and floating action button because they were added to the scope of
this file for free when we added that import statement at the top of the file.
So the floating button, the UPA and for that matter, material, scaffold and text were all imported
into our application thanks to this import statement up here.
That's why we were able to reference these different classes.
Now, the second thing you might be a bit curious about is the distinction between this name of floating
action button and the word floating action button over here.
So let's clear that up as well.
On the left hand side, we wrote out floating action button with a lowercase F.
Because we are passing that as a parameter to the scaffold widget right here.
So we were just two seconds ago, we were looking at the documentation for the scaffold constructor
and this documentation said, oh, yeah, you can pass me a floating action button parameter.
And if you do, I'll do my best to show that on the screen for you.
So that's why we added in floating action button right here.
Then to specify exactly what widget we wanted the scaffold to show when it tried to show something on
the bottom right hand side of the screen, we passed in the flooding action button over here, which
is the name of another widget that is provided to us for free by Flutter.
So that's why you're seeing these kind of duplicate names right here.
They don't have to be identical.
It just happens that that is how Flutter decided to name these things.
The one on the left is tied to the scaffold class.
The one on the right is the name of a unique widget that can be used to display a button on the bottom
right hand corner of the screen.
OK, so hopefully that clears up possibly a little bit of confusion now you'll notice that if I hover
over this green squiggly right here.
I get this little warning and it says the parameter of on press is required.
So let's take a quick pause right here.
We'll continue the next section and we'll figure out exactly what that error message or what that little
warning means.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.