如何更改小部件的hint text長度textfield?。...例如,提示文本被截斷,Write your text here by cli...。但我需要它來顯示全長。
TextField(
minLines: null,
maxLines: null,
maxLength: 100,
keyboardType: TextInputType.multiline,
decoration: InputDecoration(
border: InputBorder.none,
hintText: 'Write your text here by clicking here on this loonnggggg text'
),
),
);
uj5u.com熱心網友回復:
你可以使用hintMaxLines. 喜歡hintMaxLines: 2
TextField(
minLines: null,
maxLines: null,
maxLength: 100,
keyboardType: TextInputType.multiline,
decoration: InputDecoration(
border: InputBorder.none,
hintText: 'Write your text here by clicking here on this loonnggggg text',
hintMaxLines: 2,
),
)
uj5u.com熱心網友回復:
試試下面的代碼希望對你有幫助。使用的hintMaxLines財產
參考hintMaxLines 
uj5u.com熱心網友回復:
hintMaxLines在hintText 之后定義。示例 :
hintText: '這是hintText', hintMaxLines: 3
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/375650.html
標籤:扑
上一篇:在Flutter中使用Gridview時“不正確使用ParentDataWidget”
下一篇:從JSON中的隨機鍵獲取值
