Flutter BottomNavigationBar边框?

时间:2020-04-15 21:04:32

标签: flutter

我想让BottomNavigationBar的阴影更暗,更明显。我通常通过添加边框来做到这一点,但是我目前无法做到。感谢您的帮助!

1 个答案:

答案 0 :(得分:1)

这是向BottomNavigationBar

添加边框的方法
() => showModalBottomSheet(
            context: context,
            shape: RoundedRectangleBorder(
              borderRadius: BorderRadius.circular(30),
              side: BorderSide(color: Colors.black, width: 2.0),
            ),
            builder: (context) => Container(
              decoration: BoxDecoration(
                boxShadow: [
                  BoxShadow(
                    color: Colors.black,
                    blurRadius: 20.0, // has the effect of softening the shadow
                    spreadRadius: 5.0, // has the effect of extending the shadow
                    offset: Offset(
                      10.0, // horizontal, move right 10
                      10.0, // vertical, move down 10
                    ),
                  )
                ],
              ),
            ),
          ),

还请查看框阴影,它可能具有您想要的效果