I'm designing a layout in which I've a TextFormField
. Text in TextFormField
vanished. I want text remain on first line.
This is how it looks when I enter text
And this is how it looks when I enter more text
Here is my code
Container(
margin: EdgeInsets.only(left: 96, right: 96),
width: 171.0,
height: 22.0,
child: TextFormField(
keyboardType: TextInputType.emailAddress,
decoration: loginPageInputDecoration(),
),
),
loginPageInputDecoration
InputDecoration loginPageInputDecoration() {
return const InputDecoration(
border: InputBorder.none,
fillColor: fTextFieldColor,
filled: true,
);
}
Increase height of the Container as per your choice and the issue will be solved
Container(
margin: EdgeInsets.only(left: 96, right: 96),
width: 171.0,
height: 44.0,
child: TextFormField(
keyboardType: TextInputType.emailAddress,
decoration: loginPageInputDecoration(),
),
),
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.