Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图改变我的 TextFormField 指针的颜色,我尝试改变光标颜色的颜色,但指针是默认颜色。在android中我知道该怎么做,但在颤振中我看不到任何答案。有人知道该怎么做吗?谢谢。
(https://i.stack.imgur.com/WibZM.png)
您可以使用 cursorColor 参数来执行此操作。
第二种方法,更改 MaterialApp 主题:
theme: ThemeData( textSelectionTheme: TextSelectionThemeData( cursorColor: YourColor, ), ),