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
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
At the end of the last section, we started up our sample application inside of our emulator.
So now you should see the default counter application that tells you how many times you've pressed some
given button and you can click on the button and see that count increment.
Now, I've taken the liberty of also starting up my code editor inside that PIC's directory as well.
And so I encourage you to pause video right now and make sure you start up your code editor to.
Once you get your code editor open, you're going to find a collection of different files and folders
inside of our Picks directory.
We're going to start to explore some of these different files and folders over time.
But right now, we're going to be 100 percent focused on exactly one very specific folder, and that
is the Lib directory.
So 99 percent of all the code that you and I write to build flutter applications is going to be placed
inside of this lib directory.
Every lib directory that you're going to work with is always going to have a main dirt file inside of
it.
The main thought dirt file is very special.
It's the first file that gets loaded up and executed when our application is ran inside of our mobile
device.
So we need to make sure that we always have one file called Main Dart inside the Lib directory.
Now, we can certainly have other files inside of here as well, but at a minimum, we have to have
a main file.
If you now open up this file, you'll see that there's a tremendous amount of code already inside of
here.
Now, I don't know about you, but I like to learn things from scratch.
And I don't really like using a lot of pre generated code.
So rather than trying to work with all this stuff, I'm going to highlight all that code and delete
it like so.
So we'll start completely fresh and we'll get a really good idea of how to build up an application from
scratch.
Now, I'm sure you're very excited to get started on this application right here, but there's going
to be a little bit of a learning curve to get to this point.
So rather than trying to just be line fetching some images and showing them on the screen, I think
we should set a little bit more realistic short term goal.
Let's say that for right now, we'll just try to get some very plain content to appear on the screen
of our device.
So on the screen of our emulator over here, in other words, let's just try to get some very plain
text to show up.
So in order to get some text to show up, I'm going to go back over to my main dirt file and then inside
of here I'm going to lay out a couple of comments that are going to guide me through the process of
getting some content to appear on the screen.
So I'm going to lay out four separate comments that are going to walk us through exactly what we have
to do.
At the very top, I'm going to add a comment that says that I need to import a helper library from Flutter.
To get content on these screen, so can you step one, we're going to have to import some code into
our project and we'll talk exactly about what an import statement is doing for us in just a moment.
But first, let's continue on with a couple more comments, so I think it's second thing we need to
do is define a main function to run when our app starts.
So just as before, back inside of Dark Pad, where we said we have to define a main function, which
is the first function that gets ran inside of our program.
Same is true as a flutter as well.
So every flutter after we build is always going to have exactly one main function defined inside of
it, and that main function will be executed for us automatically.
Then inside that main function, we're going to do two additional steps.
First, we're going to create a new text widget to show some text on the screen.
And then finally, we're going to take that widget and get it on the screen, so creating the text widget
or creating something that's going to show some information on the screen is a slightly different process
than actually taking that thing and telling our mobile device to put it on the screen.
Two separate things.
On the one hand, we have to first create the widget and then the second step is to actually get it
on the screen of our device.
OK, so that's the four steps that we're going to go through.
So let's take a pause right here.
We'll come back to the next section and we're going to start on these four steps.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.