All language subtitles for 005 Import Statements_en

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

In the last section, we wrote out four comments to guide us through the process of getting some content

to show on the screen of our device in the section, we're going to tackle step number one, which is

to import some code into our project so that we can actually work with our mobile device and get some

content to show up.

So before we write any code for this, I want to tell you a little bit more about how import statements

work.

All right, so quick diagram right here.

OK, so in the very, very center of this diagram is our application, and right now our entire application

consists of just the main file.

Outside of our application, we have access to a ton of different code, so we have access to the entire

darte standard library, which we took a little bit of a glance at the documentation for.

And we also have the entire flutter standard library as well, which includes a lot of default widgets

and things to help us build out mobile applications in order to get access to any of this code inside

of our application, we have to first import it into our project or more specifically, import it into

the file that we're working on.

So if I want to say import a file from the Flutter Standard Library into my main file, I have to write

out an import statement that tries to specifically go into the flutter standard library package, find

some module inside of here, and then specifically add that module to my main file.

Now, there's some very specific syntax around this.

So let's look back over to our code editor.

We're going to add our import statement and then we'll talk about how that syntax works.

All right, so underneath this first comment, I'm going to write out imports and then going to put

a set of single quotes, I'll say package Colin Flutter.

Flash material, dot dart like so.

OK, so that's our first import statement now before we talk about the exact syntax of this import statement,

I want to let you know one very important thing here in Darte, there are three different types of import

statements.

The syntax around the import state import statement is going to change slightly depending upon where

we are importing code from.

So what you're seeing right here is how we write an import statement to import code from a third party

package.

If we're writing an import statement to import code from the standard library or to import code from

a file that you and I have written inside of our project directory, then this syntax is going to change

just a little bit.

So this is one form of syntax.

And very shortly we'll see those other two forms as well.

OK, so now let's break down the syntax right here and talk about what's going on.

All right, here we go.

So here's that entire line of code broken down step by step.

So the first word, I think you get a good sense of what's going on there.

It's an import keyword.

It's telling darte.

We want to import some other file into this one.

Then inside of that string is where things start to get really interesting.

So the first word is package and then a colon.

The word package specifically tells darte that we're trying to import code from a third party library

that has been installed into our project.

If we are importing code from the standard library or from a file that you and I wrote, then we're

not going to have this word there.

But we'll talk more about those import statements later on when we actually make use of them.

After we write out package and then our colon, we then place the name of the library that we want to

import code from.

So in this case, we are trying to import some code from the flutter library.

We then place a slash and then the name of the file that we're trying to import, so in this case we're

trying to import the material file from the flutter library.

Now, this last part right here might seem a little bit scary.

You might be thinking, well, Stephen, how will I know what file I want to import from this library?

And for that, don't sweat it.

The documentation for the flutter for me, for the library that you're using is always going to tell

you more or less exactly what file you want to import into your project.

So in general, if you read the documentation, you're going to have a good idea of exactly what file

you're trying to import.

OK, so that's what's going on with this line of code right here.

So now that we've imported this file into our project, which has some helpers to get the content on

the screen, we'll continue in the next section where we'll define our main function and then continue

on with the rest of our steps.

So quick break and I'll see you in just a minute.

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