Flutter Chapter 5 of 16
User Input and Forms
Collect input with text fields, validated forms, checkboxes, switches, sliders, pickers and gestures.
Apps are a conversation. This chapter covers the half where the user talks: typing, choosing, tapping and dragging.
Lessons in this chapter
- TextField and TextEditingController in FlutterLearn TextField in Flutter: read input with onChanged and controllers, decorate fields, set keyboard types, handle focus and passwords.
- Forms and Validation in FlutterBuild validated forms in Flutter with Form, TextFormField and GlobalKey: validators, error messages, saving values and submitting.
- Checkbox, Switch, Radio and Slider in FlutterLearn Flutter selection controls: Checkbox, Switch, radio groups, SegmentedButton and Slider, with list tile versions and state handling.
- Dropdowns, Date Pickers and Time Pickers in FlutterLet users choose from a list or pick a date and time in Flutter with DropdownMenu, showDatePicker, showTimePicker and date ranges.
- Gestures in Flutter: GestureDetector, InkWell and DismissibleHandle taps, long presses, drags and swipes in Flutter with GestureDetector and InkWell, and build swipe-to-delete with Dismissible.