How do I only apply padding to the text in a TextField in Flutter?

To apply the padding to the content of the TextField. You can apply the

contentPadding property of ItemDecoration at decoration property of TextField.

Like this:

  textAlign: TextAlign.left,
  decoration: InputDecoration(
    hintText: 'Enter Something',
    contentPadding: EdgeInsets.all(20.0),

Leave a Comment