Guilherme Ferreira
Guilherme Ferreira

Reputation: 185

Is it possible to change the margin/padding between the text and the border?

My issue is very simple to explain. As the title goes, is it possible to change the margin/padding between the text and the border in a TextField? More precisely, the margin between the text baseline and the underline border of the text field.

I could brute force this and just draw a line where I want it and just stop drawing the border. but it doesn't look good with the auto error validators.

Upvotes: 0

Views: 558

Answers (2)

Mohamed hassan kadri
Mohamed hassan kadri

Reputation: 1069

For any Custom decoration you can you use InputDecoration provided by the TextField widget . And from there edit the default padding or do any styling

Upvotes: 1

Mikhail Ponkin
Mikhail Ponkin

Reputation: 2711

Yes, you can pass decoration parameter to TextField. It accepts InputDecoration, which has contentPadding parameter.

Upvotes: 1

Related Questions