Handling User Input

Use TextField and setState to get user input data.

TextField(
    decoration: InputDecoration(labelText: 'name'),
    onChanged: (String value) {
        setState(() {
            titleValue = value;
        });
    },
)

Parameters need to know:

  • decoration:InputDecoration(labelText:'')
  • obscureText
  • keyboardType:TextInputType.xxx

results matching ""

    No results matching ""