I want to change the height of a TextField in Flutter but I don't know which one is the best way.
- Wrap the
TextFieldin aSizedBox - Use content
paddingproperty
If you have some experience, please share it. I just want to know the differences.
I want to change the height of a TextField in Flutter but I don't know which one is the best way.
TextField in a SizedBoxpadding propertyIf you have some experience, please share it. I just want to know the differences.
Solution 1
const SizedBox(width: 100.0,child: TextField())Solution 2
const TextField( decoration: InputDecoration( contentPadding:EdgeInsets.symmetric(vertical:40.0) ,) ,)You can also edit the
maxLines:property to make the box bigger