how to display no. of character user can type and how many characters user had typed in TextFormField Flutter


How can we display the count of input characters entered by the user and how many characters user can type in that TEXTFORMFIELD in Flutter? Like this enter image description here

image credits : blog link


You can add maxLength property (it will show the writtenCharacters/totalLimit)

  maxLength: 45,

Or you can also have alternative (it will not show the writtenCharacters/totalLimit), but for this you need to import

import 'package:flutter/services.dart';

  inputFormatters: [

Answered By – tanharpatel

Answer Checked By – Marie Seifert (FlutterFixes Admin)

Leave a Reply

Your email address will not be published.