简体   繁体   English

如何使按钮的角仅在顶部变圆?

[英]How can I make a button's corner only rounded on the top?

I'm trying to make a button which has rounded corners on the top and a normal corner on the bottom. 我正在尝试制作一个按钮,该按钮的顶部为圆角,底部为正常角。 How can I make it like this? 我怎么能这样呢?

An General Example : 一般示例:

RaisedButton(
              onPressed: () {},
              shape: RoundedRectangleBorder(
                  borderRadius: BorderRadius.only(
                      topLeft: Radius.circular(15.0),
                      topRight: Radius.circular(15.0))),
              child: Text('Click Me!'),
              color: Colors.blueAccent,
              textColor: Colors.white,
            ),

As Per pskink Comment : 据每个pskink评论:

RaisedButton(
              onPressed: () {},
              shape: RoundedRectangleBorder(
                  borderRadius: BorderRadius.vertical(
                top: Radius.circular(15.0),
              )),
              child: Text('Click Me!'),
              color: Colors.blueAccent,
              textColor: Colors.white,
            ),

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM