【发布时间】:2020-01-20 12:54:54
【问题描述】:
编辑:我使用的是 IOS 模拟器,以下问题可能不会在所有平台上都存在。
我的印象是,在创建 RaisedButton 时,可以在光标悬停在按钮上时更改按钮的颜色。
然而情况似乎并非如此。
// 创建按钮
RaisedButton(
onPressed: () {},
color: Colors.redButtonBackgroundColo
textColor: Colors.white,
disabledColor: Colors.disabledRedButtonBackgroundColor,
disabledTextColor: Colors.white,
disabledElevation: 4,
elevation: 4,
hoverColor: Colors.redHoveredOverButtonColor, //<--- Here is where I would like to change the button color (to a slightly lighter shade.)
padding: const EdgeInsets.all(14.0),
),
提前感谢您提供的任何帮助。
【问题讨论】: