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
In the last section, we started working on our image list widget before we add any methods to this
thing, I want to make sure that it gets displayed by the app widget.
So I'm going to flip over to my app dart file at the very top.
I'm going to import the image list widget that we just created.
So I will import from the widgets folder, the image list, darte file.
Now, to make sure that our app widget shows the image list, I'm going to find the app states builder
method.
Here's builded right here and somewhere inside of here, we need to create a new instance of image list
that's going to make sure that any time the app widget shows on the screen, it will also show the image
list, which is at present are scaffold, which it has a body parameter of that text counter.
Now, we don't really need to show that text counter anymore.
So I think that we should probably replace that text widget and instead show an instance of the image
list.
So for the body parameter right here, I will create a instance of image list.
Now, any time that we create our copy of Image List right here and try to show it on the screen, the
image list is definitely going to need that list of all the image models that we have fetched so far.
So we need to take this list of images and pass it down to the image list widget, so to do so, I'm
going to go back to the image list constructor right here, and I will pass images into it.
OK, so that looks good.
We've now communicated our list of images down to the image list.
However, you'll notice we got the red squiggly right here is because we are trying to pass down an
argument to the image list, but we have not yet configured the image list constructor to accept a list
of images.
So to make sure that the image list expects to get this list, I will open up my image list dirt file
again, and I'm going to add a constructor method to this thing that's going to accept that list of
images and assign it to an instance variable.
I'll first put together the image list constructor.
And this thing is going to accept a parameter as the first argument, we'll say distort images, and
so because we put down this dot images, that is assuming that we're going to have a instant's variable
called images.
So I will say, just as we have before, we want a list that's going to contain image models.
And we want to call that images like some.
Now, when I do so, I'm going to flip over this thing right here, you know, I've got a little air
on image list.
One of the areas that we have at present is something that says that we are missing a implementation
of the build method.
OK, well, you know, that's to be expected.
No problem there.
But then we've got a second error.
This one says that our class inherits from the class that is marked as immutable and therefore should
also be immutable.
Or another way that it puts it is to say that all the fields or all the instance variables on this class
must be final.
So we're seeing that error message right there because of how we defined this instance variable right
here.
So let's take a quick pause.
We're going to come back and talk about why we're seeing this error message and it's going to tie back
into that whole idea of how stateless widgets are supposed to have data that does not change over time.
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.