© Fu Cheng 2019
F. ChengFlutter Recipeshttps://doi.org/10.1007/978-1-4842-4982-6_6

6. Form Widgets

Fu Cheng1 
(1)
Sandringham, Auckland, New Zealand
 

Form controls are important in mobile apps to interact with the user. Flutter provides a set of form widgets for Material Design and iOS style. These form widgets generally have no internal state. Their appearance and behavior are purely defined by constructor parameters. With state maintained in ancestor widgets, form widgets are re-rendered to reflect to state changes. This chapter covers recipes related to basic usage of form widgets.

6.1 Collecting Text Inputs

Problem

You want to collect text inputs.

Solution

Use TextField for Material Design and CupertinoTextField for iOS style.

Discussion

To collect user ...

Get Flutter Recipes: Mobile Development Solutions for iOS and Android now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.