Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,730 --> 00:00:05,770
In the last section, we customize our email field by specifying the keyboard type for it so that the
2
00:00:05,770 --> 00:00:08,090
user can more easily select that at Symbol.
3
00:00:08,620 --> 00:00:11,800
We're not going to move forward onto creating our password field.
4
00:00:12,190 --> 00:00:16,600
The password field is also going to be a text form field, but it's going to have some slightly different
5
00:00:16,600 --> 00:00:17,650
options paths to it.
6
00:00:18,190 --> 00:00:23,890
So to get started, I'm going to expand the password field method and from there we are going to return
7
00:00:24,400 --> 00:00:26,770
a text form field.
8
00:00:28,220 --> 00:00:32,210
And like I just mentioned, a lot of these options are going to be very similar for the password field,
9
00:00:32,540 --> 00:00:37,250
the first property we're going to add on is that decoration to make sure that we specify an appropriate
10
00:00:37,250 --> 00:00:39,820
label text, inappropriate hint as well.
11
00:00:40,730 --> 00:00:46,580
So inside of the text form field, I'm going to add the named property of decoration and I'm going to
12
00:00:46,580 --> 00:00:48,200
give it an input decoration.
13
00:00:51,330 --> 00:00:59,880
I'll give it a label text of how about enter password and then for text, you just do something simple
14
00:00:59,880 --> 00:01:06,570
like password adding in a hint or a placeholder to a password feel doesn't make a lot of sense because
15
00:01:06,570 --> 00:01:10,140
we can't really give our users a hint of what their password is, per say.
16
00:01:10,560 --> 00:01:14,550
But we can at least add something in here to say like, yeah, this really is supposed to be your password.
17
00:01:15,780 --> 00:01:16,140
All right.
18
00:01:16,140 --> 00:01:17,550
So that's enough to get started with.
19
00:01:17,790 --> 00:01:22,980
I don't think that we need to add in a keyboard type because for a password, we don't really care about
20
00:01:22,980 --> 00:01:25,540
presenting that at Symbol quite so prominently.
21
00:01:25,920 --> 00:01:30,840
So no need to add a keyboard type on the text form field for the password field.
22
00:01:31,730 --> 00:01:34,580
Now, to test this out, I'll scroll back up to my build method.
23
00:01:36,130 --> 00:01:41,770
I'll find the password field call that we had commented out and I'm going to uncommented like so.
24
00:01:43,280 --> 00:01:44,930
Then I will flip back over to my terminal.
25
00:01:45,710 --> 00:01:47,960
I'm going to refresh the application with Shifta.
26
00:01:49,150 --> 00:01:52,720
And then I will expect to see a second input appear here on the screen.
27
00:01:53,380 --> 00:01:54,190
All right, so there it is.
28
00:01:54,520 --> 00:01:57,340
So we've now got e-mail address and enter password.
29
00:01:58,220 --> 00:02:01,040
So I can select this thing and then enter and text.
30
00:02:02,690 --> 00:02:07,110
Now, as I'm starting to look at this, it you know, there's something a little bit awkward about it.
31
00:02:07,550 --> 00:02:13,850
Notice how on the first input up here, we have a label of email address and in the second says enter
32
00:02:13,850 --> 00:02:17,550
password, kind of inconsistent with the terminology we're using there.
33
00:02:17,780 --> 00:02:22,700
So just because I'm a little bit nit picky, I think I am going to change the label text on the password
34
00:02:22,700 --> 00:02:24,830
field to be simply password.
35
00:02:27,040 --> 00:02:30,670
Now, the label text in the text are the same, which is also not the best thing in the world.
36
00:02:30,670 --> 00:02:33,550
But, hey, you know, I let's just we don't need to worry that much.
37
00:02:33,550 --> 00:02:35,050
I guess this is good enough for now.
38
00:02:35,860 --> 00:02:36,220
All right.
39
00:02:36,220 --> 00:02:40,570
Now, the other thing that you might be curious about here is that when I try to enter in some text
40
00:02:40,570 --> 00:02:43,810
with the password, it's all displayed with plain text.
41
00:02:43,810 --> 00:02:48,760
But be really nice if we instead saw, like, those little security dots instead so that other people
42
00:02:48,760 --> 00:02:52,960
can't look over our user shoulder and plainly see the password of our user.
43
00:02:53,460 --> 00:02:59,110
So I would really like to make sure that this password input right here is regarded as a password input
44
00:02:59,110 --> 00:02:59,680
element.
45
00:03:00,760 --> 00:03:06,190
To add on that customization, we're going to again look at the documentation for the text form field.
46
00:03:08,260 --> 00:03:15,580
So back at my documentation, I'm going to find the text form field class, you can probably guess where
47
00:03:15,580 --> 00:03:16,360
we're going to go.
48
00:03:16,690 --> 00:03:18,160
I'm going to find my constructor.
49
00:03:19,560 --> 00:03:25,260
So on my constructor right here, we're going to look for a named property of obscure text right here,
50
00:03:25,860 --> 00:03:29,190
so obscure text is a boolean by default.
51
00:03:29,190 --> 00:03:30,170
It is false.
52
00:03:30,930 --> 00:03:37,650
If we pass in obscure text of true instead, then that input will show dots after a user enter some
53
00:03:37,650 --> 00:03:38,200
text in.
54
00:03:38,850 --> 00:03:45,360
So on my password field right here, I'm going to enter in outside of the input decoration.
55
00:03:46,700 --> 00:03:52,100
I'll enter an obscure texts, true, like so.
56
00:03:53,050 --> 00:03:56,110
So now if I save this and do a quick refresh again.
57
00:03:58,190 --> 00:04:01,160
I should now be able to select that password input.
58
00:04:02,320 --> 00:04:03,670
And then when I enter and text.
59
00:04:04,650 --> 00:04:09,330
The first character is displayed as plain text, and that's just a helper so that users understand what
60
00:04:09,330 --> 00:04:10,320
character they just pressed.
61
00:04:10,560 --> 00:04:15,090
But everything else inside there is represented with a single dot, which is definitely what you would
62
00:04:15,090 --> 00:04:16,480
expect for a password input.
63
00:04:17,130 --> 00:04:21,060
So this is how we turn a normal text input field into that kind of password.
64
00:04:21,060 --> 00:04:21,790
Appropriate one.
65
00:04:22,260 --> 00:04:28,710
Now, for the rest of this application, I am not going to use obscure text just because I want to have
66
00:04:28,710 --> 00:04:31,110
you see the text I'm entering in that password field.
67
00:04:31,110 --> 00:04:35,370
It's going to be a little bit relevant later on for you to be able to see the actual text on mentoring.
68
00:04:35,580 --> 00:04:37,740
So I personally, I'm going to remove the setting.
69
00:04:37,950 --> 00:04:42,430
But you are absolutely free to to leave it on there and leave it in as true.
70
00:04:42,870 --> 00:04:46,770
One other thing you could do is just leave it as false, like so little bit.
71
00:04:47,010 --> 00:04:50,640
I don't really have to because like I said, obscure text defaults to be false.
72
00:04:50,880 --> 00:04:54,600
But if you just want to remember how you can obscure the text more easily, you could definitely leave
73
00:04:54,600 --> 00:04:55,380
that note in there.
74
00:04:55,620 --> 00:05:00,600
But again, I'm going to remove it simply because I want you for this cause to be able to see the text
75
00:05:00,600 --> 00:05:01,140
that's in there.
76
00:05:01,920 --> 00:05:03,870
OK, so that's good for a password field.
77
00:05:03,900 --> 00:05:07,890
Let's take a quick break and we'll come back in the next section and put together our Smitt button at
78
00:05:07,890 --> 00:05:08,970
the bottom of the form.
7759
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.