繁体   English   中英

Flutter:如何更改 TextField 中光标的半径?

[英]Flutter: How to change Radius of the cursor in the TextField?

我想更改 TextField 中光标的半径。 在 Flutter 中有什么方法可以做到这一点。

在 TextField 中有一个名为cursorRadius的属性。 您可以使用它设置所需的 cursorRadius。

这是它的代码。

TextField (
     cursorRadius: Radius.circular(5.0), //you can play with the number to get the result you want
      decoration: InputDecoration(
        border: OutlineInputBorder(),
        labelText: 'Username',
      ),
    ),

默认结果

在此处输入图片说明

使用cursorRadius属性后的结果

在此处输入图片说明

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM