应用栏上的圆形底部 [英] Rounded bottom on appbar

查看:23
本文介绍了应用栏上的圆形底部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想制作一个带有圆形底部的应用栏,如下所示:

I want to make an appbar with a rounded bottom, like so:

我将如何实施这样的应用栏?我曾尝试阅读CustomPainter的文档,但我不认为这是要走的路.

How would I go about implementing such an appbar? I have tried reading up on the documentation for CustomPainter, but I don't feel like that is the way to go.

推荐答案

在Flutter中,您可以在带有形状属性的AppBar小部件中使用自定义形状.

In Flutter you can have custom shape in AppBar widget with shape property.

  AppBar(
    title: Text('My App'),
    shape: RoundedRectangleBorder(
      borderRadius: BorderRadius.vertical(
        bottom: Radius.circular(30),
      ),
    ),
  ),

这篇关于应用栏上的圆形底部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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