Hello in this video I'm going to show you the text field input widget. This couldn't be simpler. Basically a text field they can input text into it as a regular child is called text field. Like so. And in here the whole bunch of properties that you can modify. So before we get on to the on change on top stuff, you can change the style the decoration you know stuff like the color can change, you know, even the cursor property, the more like the radius, the with the colors, you can do a lot of you know, customization, you can just say blip so you do set enabled to false for that get the max length as well.
So if you want to read them, you know restrict the length, the number of lines, all that stuff, I want you to you know, have a go at that itself and the text on all of that stuff, or I want to show you, it you know when you type something in so if I just actually show you what we get so far. So we got this little textbooks Yeah, so that's the reason only two messing around with the the decoration property and the theme etc to you know, get a better looking text field, but at the moment know what's happening with that text so what we can do is stuff that with the unchanged method takes a string color str this basically gets triggered every single time a change occurs in that tech field. So if you add a cater, it will get triggered yeah 10 characters will get through the 10 times if you delete it, it will get triggered.
So if I just simply do a photo printout STR and you see what we get Okay, and so as you can see, we've got all of that but I want to clear that for a second. So essentially, we've got lucky you know, a blank slate for typing hate. We get hate where if I type in the word hello, whenever I didn't see we get Hello obviously if I do With the keyboard still Same thing for space, w o or o j, as you can see, we get everything a here, actually, you know includes a space, whereas here doesn't, every single change is picked up right here and what you can do from here, you could maybe have another variable, so what you could do is bring a txt equal, that is just empty, and we can say, t equals. So that way we can keep track of what the text field is essentially, you know, you know, what the text field has been thought of in terms of what they use as input, and sort of the text.
The benefit of that is maybe if you had a long form username, password, we can keep track of it. Then when you click the button to submit your like login, for example. You can use these variables to do the check and you know, appropriately collect the data And provide a message saying you know, incorrect you know, password and username combination, whatever it is, but that's the way you would you know, go about it. There's other methods as well. So you can do on tap. So that's triggered when you tap it.
So when so not, not when you input it of inputs when you highlight essentially, there's also unsubmitted. If you were to click enter, or you know something else, triggers submit event. So on the login form, that's really cool. Not necessarily login, this is also triggered, which has the string as well. The great thing about that is if on submit, you can get the string and from that you could pass it into another method, which is protecting validated. That's really for the tech field.
So by now you should you know, have you know pretty good knowledge and to be able to get to grips with stuff like the text alignment, the you know, the the decoration stuff, the style or last have no way to customize that yourself, but If you have any questions, I am here, so feel free to pop me a message. And as usual, I look forward to seeing you in the next video.