how to set text in textfield in flutter code example
Example 1: flutter text field
TextField(
decoration: InputDecoration(
border: InputBorder.none,
hintText: 'Enter a search term'
),
);
Example 2: 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 3: change text in text feild flutter
TextField(
controller: txt,
),
RaisedButton(onPressed: () {
txt.text = "My Stringt";
}),