save button textflield flutter code example

Example 1: textfield set value flutter

/// You can use a [TextFormField] instead of [TextField]
/// and use the [initialValue] property. for example:

TextFormField(initialValue: "I am smart")

Example 2: how to take user input in a flutter app

For userinput, we have a widget called TextField(), An example is given below:
- The decoration field, is self explanatory.
- The labelText: tells user about what he/she has to provide in the respective TextField(). 
TextField(
	decoration: InputDecoration(labelText: 'Title'),
),

Tags:

Dart Example