gpt4 book ai didi

flutter 桌面 : How to disable "disabled" mouse-cursor on button-hover?

转载 作者:行者123 更新时间:2023-12-02 18:57:54 33 4
gpt4 key购买 nike

默认情况下,在桌面上,flutter 中的 btns 在禁用时会更改鼠标光标:

enter image description here

我们想禁用此行为,或替换为不同的光标。

最佳答案

要覆盖 ElevatedButtonTextButtonOutlinedButton 的默认 disabledMouseCursor,可以这样写:

        ElevatedButton(
style: ElevatedButton.styleFrom(
disabledMouseCursor: SystemMouseCursors.basic,
),
// ...
)

参见ButtonStyle class了解更多信息。

关于 flutter 桌面 : How to disable "disabled" mouse-cursor on button-hover?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65946236/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com