如何在flutter中改變TextFormField提示標簽的背景顏色?
uj5u.com熱心網友回復:
你可以使用backgroundColor TextStyle的屬性來改變labelText或hintText的背景顏色:
TextFormField(
裝飾。const InputDecoration(
hintText。'Hint Text'。
labelText: 'Label Text',
hintStyle。TextStyle(
backgroundColor: Colors.red, //改變提示文本的背景顏色。
),
labelStyle。TextStyle(
backgroundColor: Colors.blue, //改變標簽文本的背景顏色。
),
),
)
uj5u.com熱心網友回復:
你可以編輯InputDecoration的hintStyle
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/315146.html
標籤:

