Skip to content Skip to sidebar Skip to footer

Changing Flutter Textfield Proportions

I'm starting to transition my code from using standard Android libraries, into Flutter, so I can rapidly deploy onto iOS devices as well, but I just have a concern about the propor

Solution 1:

Set the isDense: true in InputDecoration. Then adjust contentPadding in InputDecoration as you want

TextField(
  decoration: InputDecoration(
    hintText: "Username",
    isDense: true,
    contentPadding: EdgeInsets.symmetric(  //You can also use EdgeInsets.only horizontal: 0.0, //Change this vertical: 0.0, //Change this 
    ),
  ),
)

See demo here

Post a Comment for "Changing Flutter Textfield Proportions"