What are the important attributes/properties of TextFormField in Flutter can someone tell me?
Asked
Active
Viewed 182 times
0
-
Depedns on your need, check [TextFormField](https://api.flutter.dev/flutter/material/TextFormField-class.html) – Md. Yeasin Sheikh Aug 12 '22 at 11:40
2 Answers
0
You can study the constructor
about TextFormField
Here is the example of TextFormField
TextFormField(
decoration: InputDecoration(
isDense: true,
labelText: labelText,
labelStyle: TextStyle(fontFamily: "ROCK", color: labelColor),
floatingLabelBehavior: FloatingLabelBehavior.always,
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: borderColor!),
borderRadius: BorderRadius.circular(15)),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: borderColor!),
borderRadius: BorderRadius.circular(15)),
),
);
-
I'm not asking for Example. Can you tell me attributes of TextFormFields.?? – Hammad Ali Aug 13 '22 at 12:28
0
Also Check TextFormField Properties here
TextFormField(
decoration: const InputDecoration(
icon: Icon(Icons.person),
hintText: 'Hint Text',
labelText: 'Name *',
),
onSaved: (String? value) { },
validator: (String? value) {
return (value != null && value.contains('@')) ? 'Do not use the @ char.' : null;
},
)

Sabahat Hussain Qureshi
- 1,176
- 3
- 14