Summary

In the project that you've built in this chapter, you've seen how to create interactive apps using State. 

You've created a Stateless widget and transformed it into a stateful widget. In doing so, you've seen the different implementations between the two, and you've learned that in Flutter, widgets are immutable. It's the State that changes.

You have used two very important widgets, which help you to interact with the users: TextField and DropdownButton.

For TextField, you've used one of the possible ways to respond to the user input, which is using the onChanged() event, and from there, you called the setState() method, which updates the inner State of a widget. 

You've seen how to add a DropdownButton widget to your apps, and also how to set the items property that will contain a list of DropdownMenuItem widgets to show to the user, and again, how to use the onChanged property to respond to the user input

In other projects in this book, you'll see other, more efficient ways to deal with State in Flutter. In the next chapter, in particular, you'll see how to leverage streams of data in your apps in order to build a timer app. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.107.100