as you can see from the image above, I want to add the gap/space between 'email' label text and the actual email input ([email protected]). how to do that ?
this is my current code
Form(
child: Column(
children: [
TextFormField(
autocorrect: false,
decoration: InputDecoration(labelText: "Email"),
keyboardType: TextInputType.emailAddress,
textInputAction: TextInputAction.next,
),
],
),
);
Your text field has
UnderlineInputBorder
by default. SpecifyingcontentPadding
only would not help for it, gap between text and label would be the same anyway.To add some space you can use OutlineInputBorder along with contentPadding. If you don't want to add outline border style just use
borderSide: BorderSide.none
. Here is the code:If you still want to see underline you should use Stack widget above and add it manualy.