I have the following code for my textFormField:
Container(
alignment: Alignment.centerLeft,
height: media.height * 0.12,
decoration: txtFieldBoxDecoration,
child: TextFormField(
textAlignVertical: TextAlignVertical.center,
keyboardType: TextInputType.emailAddress,
style: const TextStyle(
color: Colors.white,
fontSize: 26,
),
decoration: InputDecoration(
border: InputBorder.none,
contentPadding: const EdgeInsets.only(top: 14),
prefixIcon: const Icon(
Icons.email,
color: Colors.white,
size: 28,
),
hintText: 'Insira seu E-mail',
hintStyle: GoogleFonts.openSans(
color: Colors.white54, fontSize: 26),
),
onChanged: (value) {},
),
),
For align the prefix Icon and the hintText, You have to remove below code from InputDecoration
contentPadding: const EdgeInsets.only(top: 14),
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments