[英]Text in TextFormField goes to vanished
我正在設計一個布局,其中有一個TextFormField
。 TextFormField
文本消失了。 我希望文本保留在第一行。
這是我輸入文字時的樣子
這就是我輸入更多文本時的樣子
這是我的代碼
Container(
margin: EdgeInsets.only(left: 96, right: 96),
width: 171.0,
height: 22.0,
child: TextFormField(
keyboardType: TextInputType.emailAddress,
decoration: loginPageInputDecoration(),
),
),
登錄頁面輸入裝飾
InputDecoration loginPageInputDecoration() {
return const InputDecoration(
border: InputBorder.none,
fillColor: fTextFieldColor,
filled: true,
);
}
根據您的選擇增加容器的高度,問題將得到解決
Container(
margin: EdgeInsets.only(left: 96, right: 96),
width: 171.0,
height: 44.0,
child: TextFormField(
keyboardType: TextInputType.emailAddress,
decoration: loginPageInputDecoration(),
),
),
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.