From the course: Flutter Essential Training: Build for Multiple Platforms

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Getting inputs from the user

Getting inputs from the user

- [Instructor] User interactions are incomplete without user inputs. A lot of the time, we need users to either fill up a form and add their details for maybe a survey or to record your delivery address for package deliveries or just a simple login page very similar to the one that we are building in our application. So in Flutter, we have a widget called TextField. And if we simply run this, here you will see then now it can take some user input. Now, by default, the styling has an underline but we can change that. Let's add a property called decoration. And give it an InputDecoration. If you're wondering what should be the widget associated in the right-hand side of this property, you can just go to the documentation here and see what is the type. And here you can see that it says that by default, it draws a horizontal line under the text field. So this styling is by default. But now let's add a different…

Contents