我正在尝试创建一个按钮,该按钮的顶部为圆角,底部为标准角。我怎么能这样呢?
答案 0 :(得分:4)
一般示例:
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,
),
根据pskink评论:
RaisedButton(
onPressed: () {},
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
top: Radius.circular(15.0),
)),
child: Text('Click Me!'),
color: Colors.blueAccent,
textColor: Colors.white,
),