【发布时间】:2021-01-30 11:40:30
【问题描述】:
我使用FlatButton 并传递了属性
FlatButton(
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
child: ...,
)
documentation says that FlatButton will become obsolete,并改为使用TextButton,但它不采用splashColor 或highlightColor 属性
TextButton(
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
child: ...,
)
不起作用。这是不允许的
我也试过这样
TextButton(
style: ButtonStyle(
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
),
child: ...,
)
我该怎么做?谢谢
【问题讨论】:
标签: flutter flutter-layout flutter-web