Void-7's

Flutter入门:关于AppBar圆角的corner遮盖的细节问题

想要把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