This chapter covers
- User interaction with gesture detectors
- Special interaction widgets like Dismissible
- Creating forms in Flutter
- Text input, drop-down lists, and more form elements
- Using keys to manage Flutter forms
This chapter is about letting users interact with your Flutter app. At the end of the day, all applications have one important job: to make it easy for a human to interact with data. And one side of that interaction is allowing users not only to look at data, but also to add to it and change it. This chapter is about that: letting users add and change data in your app. Specifically, this covers two different kinds of interactions: gestures and forms.
Gestures are any kind of interaction event: taps, drags, pans, and more. First I’ll cover how you detect and respond to these user gestures. To be honest, though, there isn’t much involved here. Flutter has a convenience widget that allows you to add gesture detectors to any location of the widget tree that you’d like.
Without knowing it, perhaps, you’ve already used gestures. All the button widgets that have onPressed and onTap are just convenient wrappers around gesture detectors. Gesture detectors are used in a similar way.