颤动中的内部阴影效果 [英] Inner shadow effect in flutter

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

问题描述

根据

解决方案

 装饰:BoxDecoration(boxShadow:[const BoxShadow(颜色:your_shadow_color,),const BoxShadow(颜色:your_bg_color,spreadRadius:-12.0,blurRadius:12.0,),],), 

According to the github issue there is no inset attribute in ShadowBox yet. Is there any workaround how to emulate inner shadow right now in flutter.

I like to achieve inner shadow effects like you can see on the following images

解决方案

decoration: BoxDecoration(
        boxShadow: [
          const BoxShadow(
            color: your_shadow_color,
          ),
          const BoxShadow(
            color: your_bg_color,
            spreadRadius: -12.0,
            blurRadius: 12.0,
          ),
        ],
      ),

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

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