All language subtitles for 39. [DART DEEP DIVE] The null Value

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
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 Download
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
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
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
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-PT Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
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
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:02,290 --> 00:00:08,100 There is an important value built into Dart which we hadn't had a look at yet. 2 00:00:08,200 --> 00:00:14,310 We had a look at string values between the quotes, at integers, doubles and so on 3 00:00:14,320 --> 00:00:18,350 but what we hadn't had a look at yet is the null value. 4 00:00:18,350 --> 00:00:26,920 Null simply is a value built into Dart which you can use if you might generally expect another type of 5 00:00:26,920 --> 00:00:27,500 value, 6 00:00:27,520 --> 00:00:31,840 let's say you have a username and that is Max 7 00:00:31,840 --> 00:00:38,410 but then something in your application happens and you want to reset that to an uninitialized state 8 00:00:38,430 --> 00:00:42,490 so to say and in such cases, you can set this to null. 9 00:00:42,490 --> 00:00:48,040 This does not violate the rule or the inference of username being a string, 10 00:00:48,040 --> 00:00:54,970 so just to prove this, if I would assign a number here, then actually here I would get an error because 11 00:00:54,970 --> 00:00:58,540 a number is of course not a string, an integer is not a string. 12 00:00:58,630 --> 00:01:03,070 Null is assignable here even though it's of course not wrapped between quotes, 13 00:01:03,070 --> 00:01:05,540 null can basically be assigned to any type, 14 00:01:05,560 --> 00:01:11,560 so no matter if you normally expect a string, integer, double, whatever it is, null can always be assigned 15 00:01:11,560 --> 00:01:18,130 and you often assign it to reset a variable, to reset the value in a variable, to indicate that you have no 16 00:01:18,130 --> 00:01:20,900 value yet, anything like that. 17 00:01:20,920 --> 00:01:24,400 You can also use it in boolean comparisons. 18 00:01:24,520 --> 00:01:30,600 So if you have an if check and you want to find out if username is set, you could check if username 19 00:01:30,820 --> 00:01:38,140 is not equal to null for example. That would be something where you would also use null because right 20 00:01:38,170 --> 00:01:44,650 now if I don't assign a value, this would for example be null, the default uninitialized state is that 21 00:01:44,650 --> 00:01:45,330 this is null 22 00:01:45,550 --> 00:01:47,740 so then such a check here could be useful. 23 00:01:48,250 --> 00:01:54,130 So using null to reset values or in checks to make sure that you have a value and you're not in an uninitialized 24 00:01:54,200 --> 00:02:00,520 state can be very important and Dart will use it throughout this course and therefore null is a value you should 25 00:02:00,520 --> 00:02:01,090 be aware of. 2724

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