首页 > 其他分享 >flutter 效果实现 —— 去除水波纹效果

flutter 效果实现 —— 去除水波纹效果

时间:2022-09-18 22:12:23浏览次数:54  
标签:水波纹 ElevatedButton 效果 transparent NoSplash splashFactory flutter

修改主题

theme: ThemeData(
  splashColor: Colors.transparent,
  highlightColor: Colors.transparent,
  splashFactory: NoSplash.splashFactory,
),

或者修改单个

ElevatedButton(
  onPressed: () {},
  style: ElevatedButton.styleFrom(
    splashFactory: NoSplash.splashFactory,
  ),
  child: Text("Button"),
),

标签:水波纹,ElevatedButton,效果,transparent,NoSplash,splashFactory,flutter
From: https://www.cnblogs.com/lemos/p/16705979.html

相关文章