Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:01,490 --> 00:00:05,990
We now have our button displayed on the screen, and when we press it, we see a print statement inside
2
00:00:05,990 --> 00:00:10,700
of our terminal, which is definitely interesting, but the button itself does not have any icon inside
3
00:00:10,700 --> 00:00:10,960
of it.
4
00:00:11,180 --> 00:00:15,410
So we're going have to figure out how we somehow are going to get that plus symbol to appear inside
5
00:00:15,410 --> 00:00:15,740
of here.
6
00:00:16,430 --> 00:00:20,020
So the first thing I want to do is take a look at the floating action button documentation.
7
00:00:20,030 --> 00:00:27,710
One more time, I'll go back over to my floating action button class right here and then back down inside
8
00:00:27,710 --> 00:00:28,430
the constructor.
9
00:00:28,790 --> 00:00:35,000
I'll find the list of name parameters now inside the list of parameters, you'll notice one called child
10
00:00:35,000 --> 00:00:35,620
right here.
11
00:00:36,260 --> 00:00:40,280
This is a name parameter that you're going to get very, very familiar with.
12
00:00:40,730 --> 00:00:46,940
So there is a tremendous number of flutter widgets that you and I are going to use that except some
13
00:00:46,940 --> 00:00:48,260
child widget.
14
00:00:48,800 --> 00:00:54,020
If we pass in a widget to this child parameter, then the floating action button is going to attempt
15
00:00:54,020 --> 00:01:00,080
to show that widget inside of itself or in this case, essentially show whatever we pass into the child
16
00:01:00,080 --> 00:01:02,120
parameter inside of the button.
17
00:01:02,390 --> 00:01:07,460
And that's how we're going to get that plus symbol to to show up or we have to do is pass in something
18
00:01:07,460 --> 00:01:08,150
to child.
19
00:01:08,870 --> 00:01:11,890
Now, this child parameter is not unique to the floating action button.
20
00:01:11,900 --> 00:01:17,180
Like I said, you're going to find that there are many, many other widgets that expect to be called
21
00:01:17,270 --> 00:01:18,440
with a child property.
22
00:01:18,650 --> 00:01:23,270
And if we pass one in, that widget will try to show whatever we passed in inside of itself.
23
00:01:25,110 --> 00:01:30,510
So I'm going to go back over to my code editor, I'll find my floating action button right here.
24
00:01:31,750 --> 00:01:37,990
And then as an additional name parameter allowed in child, and then for right now, let's try passing
25
00:01:37,990 --> 00:01:40,630
in some text and we'll just do a plus.
26
00:01:41,710 --> 00:01:43,750
Now, put a comma at the end of that line.
27
00:01:45,020 --> 00:01:50,510
OK, so I'll save this, I'll pull open my emulator, I'll restart the application.
28
00:01:54,570 --> 00:01:55,590
And how are we doing?
29
00:01:56,010 --> 00:02:02,220
OK, so we got the plus inside there, but you'll notice that that seems like an awfully small little
30
00:02:02,220 --> 00:02:02,990
plus symbol.
31
00:02:03,420 --> 00:02:05,940
I think it could definitely stand to be a little bit bigger.
32
00:02:06,420 --> 00:02:11,370
So let's take a quick pause right here and we'll try to get a better sense of whether or not we're taking
33
00:02:11,370 --> 00:02:14,580
this little plus symbol right here, the correct way or not.
34
00:02:14,910 --> 00:02:16,890
It's a quick break, and I'll see you in just a minute.
3396
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.