我正在使用FlatButton并通过属性
FlatButton(
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
child: ...,
)
Run Code Online (Sandbox Code Playgroud)
该文件说FlatButton将变得过时,并使用TextButton替代,但它并不需要splashColor或highlightColor性质
TextButton(
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
child: ...,
)
Run Code Online (Sandbox Code Playgroud)
不起作用。不允许
我也试过这样
TextButton(
style: ButtonStyle(
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
),
child: ...,
)
Run Code Online (Sandbox Code Playgroud)
我怎样才能做到这一点?谢谢