![](/img/trans.png)
[英]how to make the border of a text field change color differently only when the cursor is inside flutter
[英]how to make the border of a text field change color when the cursor is inside flutter
我想更改邊框的顏色,但僅當 cursor 在文本字段中時
在這種情況下,您可以使用focusedBorder
。
TextFormField(
decoration: InputDecoration(
border: OutlineInputBorder(),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(12,),
borderSide: BorderSide(
color: Colors.pink,
)
)
),
),
你可以找到更多關於InputDecoration
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.