All language subtitles for 014 Creating a Global Key_en

af Afrikaans
ak Akan
sq Albanian
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified) Download
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
eo Esperanto
et Estonian
ee Ewe
fo Faroese
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
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
ia Interlingua
ga Irish
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
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
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

In the last section, we spoke about how we need to create a global key and somehow reference it or

get it to reference our form state that is created and each time we create a form widget, again, I

know this stuff is kind of heavy duty, kind of complicated, but as soon as we start writing some code,

I think you'll start to get an idea of what's going on.

So let's write some code.

I'm going to begin by looking back over to my code editor and I'm going to find my login screen state

class.

So inside, if you're going to create a new instance variable that's going to store that global key.

So I'm going to make a final variable which remembers just means I cannot reassign this variable.

I'm going to call it form key because it's referencing the form into it, I'm going to assign global

key and then this thing uses that same generic syntax that we use for state up here.

Remember, these generic open closing little brackets are a way to kind of create a constructor or a

class that accepts a type almost like a function.

So we put a type inside of here and that customizes how all the functions inside of it behave, or at

least what different types they expect.

So to the global key, we do not want to reference the form class, we want to reference a class called

Form State.

So for the type here, I'm going to put in form state like so, and then I'm going to put myself in

parentheses to indicate that I want to create an instance of this global key thing.

OK, so this right here is just about the only place we're going to see this form state thing come into

play.

That's why I had to tell you about the existence of this form state, because at some point we had to,

like, write out Farm State right here.

If we just wrote form state, you probably would have been like, Stephen, why are we writing for state

and not just farm?

OK, so this creates the key.

Now, step two is to take this key and associated with the form widget that we are creating.

So on my form widget as an additional named property, I'm going to pass in key and key is going to

be the form key instance variable that we just created.

So I'm going to say form key like so.

And that's pretty much it.

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