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
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
There is an important value built into Dart which we hadn't had a look at yet.
We had a look at string values between the quotes, at integers, doubles and so on
but what we hadn't had a look at yet is the null value.
Null simply is a value built into Dart which you can use if you might generally expect another type of
value,
let's say you have a username and that is Max
but then something in your application happens and you want to reset that to an uninitialized state
so to say and in such cases, you can set this to null.
This does not violate the rule or the inference of username being a string,
so just to prove this, if I would assign a number here, then actually here I would get an error because
a number is of course not a string, an integer is not a string.
Null is assignable here even though it's of course not wrapped between quotes,
null can basically be assigned to any type,
so no matter if you normally expect a string, integer, double, whatever it is, null can always be assigned
and you often assign it to reset a variable, to reset the value in a variable, to indicate that you have no
value yet, anything like that.
You can also use it in boolean comparisons.
So if you have an if check and you want to find out if username is set, you could check if username
is not equal to null for example. That would be something where you would also use null because right
now if I don't assign a value, this would for example be null, the default uninitialized state is that
this is null
so then such a check here could be useful.
So using null to reset values or in checks to make sure that you have a value and you're not in an uninitialized
state can be very important and Dart will use it throughout this course and therefore null is a value you should
be aware of.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.