[英]How can I remove press animation of RaisedButton in Flutter?
Hi I want to remove the Animation that occurs when 'RaisedButton' is pressed in Flutter.嗨,我想删除在 Flutter 中按下“RaisedButton”时出现的 Animation。
How can I do it?我该怎么做?
RaisedButton(
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
padding: EdgeInsets.all(0),
color: Colors.white,
elevation: 0,
onPressed: (){
Navigator.push(
context, // 기본 파라미터, SecondRoute로 전달
MaterialPageRoute(builder: (context)=>TotalNotification()) // SecondRoute를 생성하여 적재
);
},
child: SvgPicture.asset(
'assets/images/BellButton.svg',
width: screenWidth * 0.0777777777777778,
height: screenWidth * 0.0777777777777778,
),
),
I could give you an idea.我可以给你一个想法。
Just wrap it with Container
instead of RaisedButton
and seek the help of GesureDetector
只需用Container
而不是RaisedButton
包装它,并寻求GesureDetector
的帮助
GestureDetector(
onTap: () {
Navigator.push( context, MaterialPageRoute(builder: (context)=>TotalNotification()));
},
child: Container(
height: 50.0,
width: 50.0,
color: Colors.white,
child: SvgPicture.asset(
'assets/images/BellButton.svg',
width: screenWidth * 0.0777777777777778,
height: screenWidth * 0.0777777777777778,
),
),
),
Hope that suits your case!希望这适合你的情况!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.