豕の家

怀着乐观总有转机

Flutter  Flutter入门:关于AppBar圆角的corner遮盖的细节问题
February 28, 2021 / 17:56 / 60 °C

想要把AppBar底部设置为圆角,发现设置之后矩形裁剪圆角剩余边角部分不管是设置颜色还是背景图片都会遮盖住下面的内容,骨钩半天看见stackoverflow上面有相同的问题贴:image-20210228175524133.png

解决方法是Scaffold的两个属性:

for bottomNavigationBar : You can set the Scaffold's extendBody property to true

Flutter extendBody property

for AppBar: You can set the Scaffold's extendBodyBehindAppBar property to true

Flutter extendBodyBehindAppBar property





© Posted By @shawnt

Comment

称呼:  
邮箱:  
网址: