TextField In Flutter

TextField In Flutter :

TextField In Flutter

This flutter tutorial post TextField In Flutter.

  • A FormField that contains a TextField.
  • Form Class: optional container for grouping together multiple form field widgets.
  • GlobalKey: Unique indentifier
  • FormState: FormState object can be used to save, reset, validation in FormField.
  • validator: It is return error string. optional. This is used to validation.
  • onSaved: Final value saved.
  • keyboardType: It is inputtype. datetime, numberWithOptions, multiline, emailAddress, number, phone, url etc.
  • onChanged: Content of the widget changes.
  • autofocus: focus true or false.
  • obscure: That is used password, pincode. obscure: true
  • textCapitalization: Input text uppercase, sentences, words,
  • textAlign: left, right, center, justify, start, end.
  • textInputAction: continue, send.
  • autocorrect: true or false.
  • cursorColor: Colors.red
  • cursorRadius: Radius.circular(0.0)
  • cursorWidth: 0.0
  • maxLength: integer
  • prefixIcon: Icon display start.
  • helperText:
  • decoration: InputDecoration(
    border: OutlineInputBorder()
    )

Program :

TextFormField(
  decoration: const InputDecoration(
    icon: Icon(Icons.person),
    hintText: '',
    labelText: '',
    fillColor:
    filled: true,
    hintStyle: new TextStyle(color: Colors.grey[500]),
  ),
  textCapitalization: TextCapitalization.sentences,
  onChanged: 
  textAlign:
  onSaved: (String value) {
   
  },
  validator: (String value) {
    return value.contains('@') ? 'Do not use the @ char.' : null;
  },
)

The flutter tutorial  is a website that bring you the latest and amazing resources of code. All the languages codes are included in this website. The languages like flutter, android, java,kotlin etc.with the help of this languages any user can develop the beautiful application

For more information about Flutter. visit www.fluttertutorial.in