Dart Tutorial

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

  1. TextField and TextEditingController in FlutterLearn TextField in Flutter: read input with onChanged and controllers, decorate fields, set keyboard types, handle focus and passwords.
  2. Forms and Validation in FlutterBuild validated forms in Flutter with Form, TextFormField and GlobalKey: validators, error messages, saving values and submitting.
  3. Checkbox, Switch, Radio and Slider in FlutterLearn Flutter selection controls: Checkbox, Switch, radio groups, SegmentedButton and Slider, with list tile versions and state handling.
  4. 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.
  5. 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.