颤振:FloatingActionButton阴影 [英] Flutter: FloatingActionButton shadow

查看:92
本文介绍了颤振:FloatingActionButton阴影的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您是否有能力或有办法更改由 FloatingActionButton.extended 或任何其他浮动按钮制成的阴影的颜色?

Are you able or is there a way to change the color of the shadow made by the FloatingActionButton.extended or any other floating button ?

推荐答案

您可以尝试这种方式:

floatingActionButton: FloatingActionButton(
      onPressed: () {},
      backgroundColor: Colors.red,
      elevation: 0,
      child: Container(
        decoration: BoxDecoration(
          color: Colors.transparent,
          borderRadius: BorderRadius.all(
            Radius.circular(100),
          ),
          boxShadow: [
            BoxShadow(
              color: Colors.purple.withOpacity(0.3),
              spreadRadius: 7,
              blurRadius: 7,
              offset: Offset(3, 5),
            ),
          ],
        ),
      ),
    ),

这篇关于颤振:FloatingActionButton阴影的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆