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
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
Now that we have managed to load a custom raised button with the pump we did mattered.
We can start doing something interesting with it.
And for example we could check that this widget has a raised button inside it and to do that we need
to use an object which is called a finder.
So over here we can type the final button equals find.
And here we get a list of all the metals that we can use to find a widget.
And the one that we want is find by type like this.
And so here we can pass braised bottom as an argument and then we need to write an expectation.
So here I can type expect that button and then I'm going to use something that is called a matter.
And in this case I can type finds one widget like this and finds one way that is a specific matter that
is defined in the flatter test package.
So in a nutshell this code tries to find a widget of type raised button inside the widget 3 that is
returned by the custom raised but the widget.
And then we expect that we find exactly one match by using this matter constant.
So let's run the tests again OK.
So let's get some more practice using matters by writing another expectation.
And here I could dive extract and then find that y type.
And this time I is flat bottom and then I want my matter to be fines nothing like this and finds nothing
is a very common matter that is used to check that no we just are fun.
So I could run the tests again and what we are saying here is that we expect to find our raised button
but not a flat bottom.
And our tests have passed again.
OK.
So let's take things one step further.
And as you can see this custom raised button takes an optional child.
We did and this is normally used to add some text inside a button.
So as our next step we cannot a child.
We did when we create this button and here we can pass up the text.
We did that says stop me for example.
And if we want here we can right expect and then find and this time we can say text and we're going
to use the same string.
So to me like this and we are going to use finds one widget as a matter.
So let's run this test again.
And the idea here is that we can pass a custom child to our widget and because this is a text widget
then we can find that we did with the text that was used to configure it.
And once again our test is green.
In summary we have discovered how we can check if a widget contains another widget either white type
or with a specific text.
And to do that we need to use finders and matters.
So let's continue on the next video.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.