[英]how to change the border color of this text field to white in flutter
[英]How to Change Flutter Text Field Border Color On Focus
我創建了一個帶有輸入修飾和 Outlineborderinput 的簡單文本字段。當我在該文本字段上輸入時,我想更改邊框顏色。 下面的鏈接,你可以看到我的作品。 我想要的是將藍色邊框更改為白色
TextFormField(
decoration: InputDecoration(
labelText: "Resevior Name",
fillColor: Colors.white,
enabledBorder:OutlineInputBorder(
borderSide: const BorderSide(color: Colors.white, width: 2.0),
borderRadius: BorderRadius.circular(25.0),
),
),
)
在 enabledBorder 中添加 focusBorder
TextFormField(
decoration: InputDecoration(
labelText: "Resevior Name",
fillColor: Colors.white,
focusedBorder:OutlineInputBorder(
borderSide: const BorderSide(color: Colors.white, width: 2.0),
borderRadius: BorderRadius.circular(25.0),
),
),
)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.